[master] 31bd91829 Improse FetchError on first byte timeout
Nils Goroll
nils.goroll at uplex.de
Mon Feb 11 13:38:08 UTC 2019
commit 31bd91829dc07c25525abcf2e4a4b91f484d7a37
Author: Nils Goroll <nils.goroll at uplex.de>
Date: Mon Feb 11 14:30:23 2019 +0100
Improse FetchError on first byte timeout
Fixes #2185
Test case by @fgsch
diff --git a/bin/varnishd/http1/cache_http1_fetch.c b/bin/varnishd/http1/cache_http1_fetch.c
index f1b0ac3cb..fa456a408 100644
--- a/bin/varnishd/http1/cache_http1_fetch.c
+++ b/bin/varnishd/http1/cache_http1_fetch.c
@@ -199,6 +199,10 @@ V1F_FetchRespHdr(struct busyobj *bo)
VSLb(bo->vsl, SLT_FetchError, "overflow");
htc->doclose = SC_RX_OVERFLOW;
break;
+ case HTC_S_IDLE:
+ VSLb(bo->vsl, SLT_FetchError, "first byte timeout");
+ htc->doclose = SC_RX_TIMEOUT;
+ break;
default:
VSLb(bo->vsl, SLT_FetchError, "HTC %s (%d)",
HTC_Status(hs), hs);
diff --git a/bin/varnishtest/tests/b00023.vtc b/bin/varnishtest/tests/b00023.vtc
index 9ee5ed340..fd64cb2bd 100644
--- a/bin/varnishtest/tests/b00023.vtc
+++ b/bin/varnishtest/tests/b00023.vtc
@@ -19,12 +19,18 @@ varnish v1 -vcl+backend {
}
} -start
+logexpect l1 -v v1 {
+ expect * 1002 FetchError "first byte timeout"
+} -start
+
client c1 {
txreq
rxresp
expect resp.status == 503
} -run
+logexpect l1 -wait
+
server s1 {
rxreq
delay 0.2
More information about the varnish-commit
mailing list