Project homepage Mailing List  Warmcat.com  API Docs  Github Mirror 
{"schema":"libjg2-1", "vpath":"/git/", "avatar":"/git/avatar/", "alang":"", "gen_ut":1746503768, "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":"a2b91cb6bbfba58fd4e1c90ffa0b8c4e", "commit": {"type":"commit", "time": 1329668777, "time_ofs": 60, "oid_tree": { "oid": "98c0b1488dee12d1aef71b4d16da6e0c75ab96a1", "alias": []}, "oid":{ "oid": "d515ddd51d6fa0061f4bed865de2dc7ab5cf24fc", "alias": []}, "msg": "Don't care for the human-readable part of \u0022HTTP/1.1 101\u0022 reply", "sig_commit": { "git_time": { "time": 1329668777, "offset": 60 }, "name": "Andy Green", "email": "andy.green@linaro.org", "md5": "4863edaebb4491aa6049a4d2d9c98c2c" }, "sig_author": { "git_time": { "time": 1322037984, "offset": 120 }, "name": "Artem Egorkine", "email": "arteme@gmail.com", "md5": "2c52e67d2b2ab0eda532e351090f56f9" }}, "body": "Don't care for the human-readable part of \u0022HTTP/1.1 101\u0022 reply\n\nWhile the protocol specification gives example of the\nhuman-readable message associated with a 101-code reply,\nnowhere does it actually enforce it. Ws4py gevent middleware\nis known to have a message other than \u0022Switching Protocols\u0022.\n" , "diff": "diff --git a/lib/libwebsockets.c b/lib/libwebsockets.c\nindex f8522b5..6baf2c7 100644\n--- a/lib/libwebsockets.c\n+++ b/lib/libwebsockets.c\n@@ -1089,8 +1089,8 @@ lws_client_interpret_server_handshake(struct libwebsocket_context *context,\n \t\t}\n \n \t\tstrtolower(wsi-\u003eutf8_token[WSI_TOKEN_HTTP].token);\n-\t\tif (strcmp(wsi-\u003eutf8_token[WSI_TOKEN_HTTP].token,\n-\t\t\t\u0022101 websocket protocol handshake\u0022)) {\n+\t\tif (strncmp(wsi-\u003eutf8_token[WSI_TOKEN_HTTP].token,\n+\t\t\t \u0022101\u0022, 3)) {\n \t\t\tfprintf(stderr, \u0022libwebsocket_client_handshake \u0022\n \t\t\t\t\u0022server sent bad HTTP response '%s'\u005cn\u0022,\n \t\t\t\twsi-\u003eutf8_token[WSI_TOKEN_HTTP].token);\n@@ -1145,8 +1145,7 @@ lws_client_interpret_server_handshake(struct libwebsocket_context *context,\n \t */\n \n \tstrtolower(wsi-\u003eutf8_token[WSI_TOKEN_HTTP].token);\n-\tif (strcmp(wsi-\u003eutf8_token[WSI_TOKEN_HTTP].token,\n-\t\t\t\t\t \u0022101 switching protocols\u0022)) {\n+\tif (strncmp(wsi-\u003eutf8_token[WSI_TOKEN_HTTP].token, \u0022101\u0022, 3)) {\n \t\tfprintf(stderr, \u0022libwebsocket_client_handshake \u0022\n \t\t\t\t\u0022server sent bad HTTP response '%s'\u005cn\u0022,\n \t\t\t\t wsi-\u003eutf8_token[WSI_TOKEN_HTTP].token);\n","s":{"c":1746425577,"u": 2438}} ],"g": 1057,"chitpc": 0,"ehitpc": 0,"indexed":0 , "ab": 0, "si": 0, "db":0, "di":0, "sat":0, "lfc": "7d0a"}