openwrt / uhttpd

[MIRROR] Tiny HTTP server
https://git.openwrt.org/?p=project/uhttpd.git;
11 stars 7 forks source link

utils: do not send "no more chunks" on timeouts #2

Open luizluca opened 10 months ago

luizluca commented 10 months ago

When a keep-alive times out, it reuses the last request parameters. If the last finished request was using chunks, the timeout will send a spurious "no more chunks" chunk again.

This patch disables chunks in the request after it has sent a "no more chunks" chunk.

Fixes openwrt/openwrt#14460

luizluca commented 9 months ago

@hauke , @jow- , Could you please take a look at this. It is a small fix.

You can reproduce the error requesting an URL using telnet and waiting until the connection timeouts. It will send a spurious 0 before closing the connection.