Project homepage Mailing List  Warmcat.com  API Docs  Github Mirror 
{"schema":"libjg2-1", "vpath":"/git/", "avatar":"/git/avatar/", "alang":"", "gen_ut":1746418058, "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":"b203017526af286fa08f9c16443a6175", "commit": {"type":"commit", "time": 1543538798, "time_ofs": 480, "oid_tree": { "oid": "89cb96e3d4e63dbecf232f01d1a5549eebcb4569", "alias": []}, "oid":{ "oid": "51a1b5eb6141be4e1ada5a4b3a5b1f42923079e2", "alias": []}, "msg": "cgi: use transaction_complete when stdout goes away", "sig_commit": { "git_time": { "time": 1543538798, "offset": 480 }, "name": "Andy Green", "email": "andy@warmcat.com", "md5": "c50933ca2aa61e0fe2c43d46bb6b59cb" }, "sig_author": { "git_time": { "time": 1543538798, "offset": 480 }, "name": "Andy Green", "email": "andy@warmcat.com", "md5": "c50933ca2aa61e0fe2c43d46bb6b59cb" }}, "body": "cgi: use transaction_complete when stdout goes away\n\ntransaction_complete includes processing for the case we are holding\nan output-side buflist, and arranges for it to be sent before the\nconnection is actually closed.\n\nThis stops very slow links not being ablet to use git clone via\ncgi mount, because the close races the flushing of the output-side\nbuflist and in the case the connection is bad, closes before\neverything was sent.\n" , "diff": "diff --git a/lib/core/dummy-callback.c b/lib/core/dummy-callback.c\nindex 8fd18be..c99270f 100644\n--- a/lib/core/dummy-callback.c\n+++ b/lib/core/dummy-callback.c\n@@ -155,7 +155,9 @@ lws_callback_http_dummy(struct lws *wsi, enum lws_callback_reasons reason,\n \t\t\t\t\t\t LWS_WRITE_HTTP_FINAL);\n \n \t\t\t/* always close after sending it */\n-\t\t\treturn -1;\n+\t\t\tif (lws_http_transaction_completed(wsi))\n+\t\t\t\treturn -1;\n+\t\t\treturn 0;\n \t\t}\n #endif\n #if defined(LWS_WITH_HTTP_PROXY)\n@@ -459,10 +461,12 @@ lws_callback_http_dummy(struct lws *wsi, enum lws_callback_reasons reason,\n \t\t\tlwsl_debug(\u0022LWS_CALLBACK_CGI_TERMINATED: ending\u005cn\u0022);\n \t\t\twsi-\u003ereason_bf |\u003d LWS_CB_REASON_AUX_BF__CGI_CHUNK_END;\n \t\t\tlws_callback_on_writable(wsi);\n-\t\t\tlws_set_timeout(wsi, PENDING_TIMEOUT_CGI, 3);\n+\t\t\tlws_set_timeout(wsi, PENDING_TIMEOUT_CGI, 10);\n \t\t\tbreak;\n \t\t}\n-\t\treturn -1;\n+\t\tif (lws_http_transaction_completed(wsi))\n+\t\t\treturn -1;\n+\t\treturn 0;\n \n \tcase LWS_CALLBACK_CGI_STDIN_DATA: /* POST body for stdin */\n \t\targs \u003d (struct lws_cgi_args *)in;\n","s":{"c":1746418058,"u": 4040}} ],"g": 5045,"chitpc": 0,"ehitpc": 0,"indexed":0 , "ab": 0, "si": 0, "db":0, "di":0, "sat":0, "lfc": "0000"}