[4.1] 0d6d6cb Use the idle read timeout only on empty requests
Martin Blix Grydeland
martin at varnish-software.com
Tue Nov 14 10:51:05 UTC 2017
commit 0d6d6cbf2e83a0c1cea8a353b5920fc6d186f9b7
Author: Martin Blix Grydeland <martin at varnish-software.com>
Date: Mon Nov 13 15:51:11 2017 +0100
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
diff --git a/bin/varnishd/cache/cache_session.c b/bin/varnishd/cache/cache_session.c
index 8c9c3b6..8ab7d51 100644
--- a/bin/varnishd/cache/cache_session.c
+++ b/bin/varnishd/cache/cache_session.c
@@ -244,7 +244,7 @@ SES_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;
i = (htc->ws->r - htc->rxbuf_e) - 1; /* space for NUL */
if (i <= 0) {
More information about the varnish-commit
mailing list