mirror of
https://github.com/warmcat/libwebsockets.git
synced 2025-03-16 00:00:07 +01:00
![]() 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> |
||
---|---|---|
.. | ||
.gitignore | ||
attack.sh | ||
favicon.ico | ||
fuzxy.c | ||
leaf.jpg | ||
libwebsockets.org-logo.png | ||
test-client.c | ||
test-echo.c | ||
test-fraggle.c | ||
test-ping.c | ||
test-server-dumb-increment.c | ||
test-server-echogen.c | ||
test-server-http.c | ||
test-server-libev.c | ||
test-server-mirror.c | ||
test-server-pthreads.c | ||
test-server.c | ||
test-server.h | ||
test.html |