Project homepage Mailing List  Warmcat.com  API Docs  Github Mirror 
{"schema":"libjg2-1", "vpath":"/git/", "avatar":"/git/avatar/", "alang":"", "gen_ut":1713496677, "reponame":"libwebsockets", "desc":"libwebsockets lightweight C networking library", "owner": { "name": "Andy Green", "email": "andy@warmcat.com", "md5": "c50933ca2aa61e0fe2c43d46bb6b59cb" },"url":"https://libwebsockets.org/repo/libwebsockets", "f":3, "items": [ {"schema":"libjg2-1", "cid":"11dfeac925640e269332a86aaee590b2", "commit": {"type":"commit", "time": 1520504872, "time_ofs": 480, "oid_tree": { "oid": "7d906d6ecdfbf49afc27e674f5910af9929dfe96", "alias": []}, "oid":{ "oid": "6a925e5179727436bf91fe60abab34ba2bfa1442", "alias": []}, "msg": "Add 'HS: ws upgrade unauthorized' on receiving 401", "sig_commit": { "git_time": { "time": 1520504872, "offset": 480 }, "name": "Andy Green", "email": "andy@warmcat.com", "md5": "c50933ca2aa61e0fe2c43d46bb6b59cb" }, "sig_author": { "git_time": { "time": 1520425429, "offset": 480 }, "name": "Joe Littlejohn", "email": "joelittlejohn@gmail.com", "md5": "b0314d076fcb62951fb6f0fd3c321ebc" }}, "body": "Add 'HS: ws upgrade unauthorized' on receiving 401\n\nIn the case that the connection cannot be established because the caller\nis unauthorized, it's likely they have to do something to gain\nauthorization before retrying. This change introduces a new message that\ncan be checked for to understand more about why the connection has\nfailed to establish.\n\nCloses #1200" , "diff": "diff --git a/lib/client/client.c b/lib/client/client.c\nindex adb1045..ded4e4b 100644\n--- a/lib/client/client.c\n+++ b/lib/client/client.c\n@@ -728,6 +728,13 @@ lws_client_interpret_server_handshake(struct lws *wsi)\n \t\treturn 0;\n \t}\n \n+\tif (p \u0026\u0026 !strncmp(p, \u0022401\u0022, 3)) {\n+\t\tlwsl_warn(\n+\t\t \u0022lws_client_handshake: got bad HTTP response '%s'\u005cn\u0022, p);\n+\t\tcce \u003d \u0022HS: ws upgrade unauthorized\u0022;\n+\t\tgoto bail3;\n+\t}\n+\n \tif (p \u0026\u0026 strncmp(p, \u0022101\u0022, 3)) {\n \t\tlwsl_warn(\n \t\t \u0022lws_client_handshake: got bad HTTP response '%s'\u005cn\u0022, p);\n","s":{"c":1713496677,"u": 981}} ],"g": 1622,"chitpc": 0,"ehitpc": 0,"indexed":0 , "ab": 0, "si": 0, "db":0, "di":0, "sat":0, "lfc": "0000"}