1
0
Fork 0
mirror of https://github.com/warmcat/libwebsockets.git synced 2025-03-16 00:00:07 +01:00
libwebsockets/lib
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
alloc.c Subject: [PATCH] Add custom allocator support using the realloc() interface 2014-12-05 07:25:24 +08:00
base64-decode.c mbed3 warning cleaning 2015-11-14 16:31:01 +08:00
client-handshake.c clean pre 1.7 2016-01-29 23:17:43 +08:00
client-parser.c clean pre 1.7 2016-01-29 23:17:43 +08:00
client.c ah http1.1 deal with pipelined headers properly 2016-01-30 11:43:10 +08:00
context.c clean pre 1.7 2016-01-29 23:17:43 +08:00
daemonize.c clean internal refactor 2015-12-17 17:03:59 +08:00
extension-permessage-deflate.c clean pre 1.7 2016-01-29 23:17:43 +08:00
extension-permessage-deflate.h extension permessage deflate 2016-01-11 11:34:01 +08:00
extension.c clean pre 1.7 2016-01-29 23:17:43 +08:00
getifaddrs.c whitespace trailing mass cleanout 2015-12-14 08:52:03 +08:00
getifaddrs.h Use LWS_HAVE_ instead of just HAVE_ 2015-10-12 09:53:17 +08:00
handshake.c multithread stability 2016-01-26 20:56:56 +08:00
header.c multithreaded service 2016-01-19 20:02:36 +08:00
hpack.c http header malloc pool implement pool 2015-12-25 14:34:20 +08:00
http2.c extension permessage deflate 2016-01-11 11:34:01 +08:00
huftable.h http2 hpack basic decode ok including huff 2014-10-12 08:38:16 +08:00
lextable-strings.h lextable add x-real-ip 2016-01-28 09:40:53 +08:00
lextable.h lextable add x-real-ip 2016-01-28 09:40:53 +08:00
libev.c multithread stability 2016-01-26 20:56:56 +08:00
libwebsockets.c clean pre 1.7 2016-01-29 23:17:43 +08:00
libwebsockets.h clean pre 1.7 2016-01-29 23:17:43 +08:00
lws-plat-mbed3.c mbed align with pt changes 2016-01-20 17:35:18 +08:00
lws-plat-mbed3.cpp mbed align with pt changes 2016-01-20 17:35:18 +08:00
lws-plat-unix.c clean pre 1.7 2016-01-29 23:17:43 +08:00
lws-plat-win.c win dont redefine _WINSOCK_DEPRECATED_NO_WARNINGS 2016-01-29 01:26:31 +08:00
minihuf.c whitespace trailing mass cleanout 2015-12-14 08:52:03 +08:00
minilex.c whitespace trailing mass cleanout 2015-12-14 08:52:03 +08:00
output.c clean pre 1.7 2016-01-29 23:17:43 +08:00
parsers.c ah http1.1 deal with pipelined headers properly 2016-01-30 11:43:10 +08:00
pollfd.c clean pre 1.7 2016-01-29 23:17:43 +08:00
private-libwebsockets.h ah http1.1 deal with pipelined headers properly 2016-01-30 11:43:10 +08:00
server-handshake.c clean pre 1.7 2016-01-29 23:17:43 +08:00
server.c ah http1.1 deal with pipelined headers properly 2016-01-30 11:43:10 +08:00
service.c clean pre 1.7 2016-01-29 23:17:43 +08:00
sha-1.c clean reduce windows build warnings 2015-12-06 08:00:03 +08:00
ssl-http2.c clean internal refactor 2015-12-17 17:03:59 +08:00
ssl.c coverity 157402 explicitly disallow handling invalid sockfd 2016-01-29 15:40:08 +08:00