1
0
Fork 0
mirror of https://github.com/warmcat/libwebsockets.git synced 2025-03-16 00:00:07 +01:00
libwebsockets/test-server
Andy Green 4019aab8da ah http1.1 deal with pipelined headers properly
Connections must hold an ah for the whole time they are
processing one header set, even if eg, the headers are
fragmented and it involves network roundtrip times.

However on http1.1 / keepalive, it must drop the ah when
there are no more header sets to deal with, and reacquire
the ah later when more data appears.  It's because the
time between header sets / http1.1 requests is unbounded
and the ah would be tied up forever.

But in the case that we got pipelined http1.1 requests,
even partial already buffered, we must keep the ah,
resetting it instead of dropping it.  Because we store
the rx data conveniently in a per-tsi buffer since it only
does one thing at a time per thread, we cannot go back to
the event loop to await a new ah inside one service action.

But no problem since we definitely already have an ah,
let's just reuse it at http completion time if more rx is
already buffered.

NB: attack.sh makes request with echo | nc, this
accidentally sends a trailing '\n' from the echo showing
this problem.  With this patch attack.sh can complete well.

Signed-off-by: Andy Green <andy.green@linaro.org>
2016-01-30 11:43:10 +08:00
..
.gitignore Ignoring linux build files 2013-01-09 15:46:11 +08:00
attack.sh uridecoding disallow uriencoded equals in name part 2015-12-18 15:40:03 +08:00
favicon.ico refactor-into-dirs.patch 2010-11-01 09:12:17 +00:00
fuzxy.c clean pre 1.7 2016-01-29 23:17:43 +08:00
leaf.jpg add by hand http send example 2013-02-14 23:24:07 +08:00
libwebsockets.org-logo.png add libwebsockets.org logo to share 2013-01-16 10:00:39 +08:00
test-client.c cleanup test app startup messages 2016-01-29 09:35:58 +08:00
test-echo.c cleanup test app startup messages 2016-01-29 09:35:58 +08:00
test-fraggle.c cleanup test app startup messages 2016-01-29 09:35:58 +08:00
test-ping.c cleanup test app startup messages 2016-01-29 09:35:58 +08:00
test-server-dumb-increment.c extension permessage deflate 2016-01-11 11:34:01 +08:00
test-server-echogen.c extension permessage deflate 2016-01-11 11:34:01 +08:00
test-server-http.c ah http1.1 deal with pipelined headers properly 2016-01-30 11:43:10 +08:00
test-server-libev.c cleanup test app startup messages 2016-01-29 09:35:58 +08:00
test-server-mirror.c multithread stability 2016-01-26 20:56:56 +08:00
test-server-pthreads.c clean pre 1.7 2016-01-29 23:17:43 +08:00
test-server.c cleanup test app startup messages 2016-01-29 09:35:58 +08:00
test-server.h extension permessage deflate 2016-01-11 11:34:01 +08:00
test.html extension permessage deflate 2016-01-11 11:34:01 +08:00