From: Andy Green Date: Wed, 24 Feb 2016 12:58:19 +0000 (+0800) Subject: user code must explicitly complete http transaction X-Git-Tag: upstream/2.0.3~207 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=dbfbbb41b138730ca0dccfa928f47db0e348738e;p=platform%2Fupstream%2Flibwebsockets.git user code must explicitly complete http transaction Signed-off-by: Andy Green --- diff --git a/changelog b/changelog index db66e9d..006cc20 100644 --- a/changelog +++ b/changelog @@ -17,6 +17,17 @@ known to affect anything until after it was fixed requests callback on writeable for the socket it will busywait until the socket closes +5) MAJOR Although the test server has done it for a few versions already, it +is now required for the user code to explicitly call + + if (lws_http_transaction_completed(wsi)) + return -1; + +when it finishes replying to a transaction in http. Previously the library +did it for you, but that disallowed large, long transfers with multiple +trips around the event loop (and cgi...). + + Changes ------- diff --git a/lib/handshake.c b/lib/handshake.c index 9bae6e4..e48af84 100644 --- a/lib/handshake.c +++ b/lib/handshake.c @@ -130,7 +130,7 @@ lws_read(struct lws *wsi, unsigned char *buf, size_t len) switch (wsi->state) { case LWSS_HTTP: case LWSS_HTTP_HEADERS: - goto http_complete; + goto read_ok; case LWSS_HTTP_ISSUING_FILE: goto read_ok; case LWSS_HTTP_BODY: