Commit 8f4ff7af authored by Martin Blix Grydeland's avatar Martin Blix Grydeland

Use the idle read timeout only on empty requests

We only want to return the connection early to the waiter when the
request is empty. Correct the read timeout calculation to reflect
that.

Thanks to Stackpath for helping to debug this issue.

Fixes: #2492
parent 89669427
......@@ -290,7 +290,7 @@ HTC_RxStuff(struct http_conn *htc, htc_complete_f *func,
WRONG("htc_status_e");
tmo = tn - now;
if (!isnan(ti) && ti < tn)
if (!isnan(ti) && ti < tn && hs == HTC_S_EMPTY)
tmo = ti - now;
z = maxbytes - (htc->rxbuf_e - htc->rxbuf_b);
assert(z >= 0);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment