diff --git a/bin/varnishd/http1/cache_http1_deliver.c b/bin/varnishd/http1/cache_http1_deliver.c index d824433676..19399589d3 100644 --- a/bin/varnishd/http1/cache_http1_deliver.c +++ b/bin/varnishd/http1/cache_http1_deliver.c @@ -142,6 +142,9 @@ V1D_Deliver(struct req *req, struct boc *boc, int sendbody) if (sc == SC_NULL && err && req->sp->fd >= 0) sc = SC_REM_CLOSE; - if (sc != SC_NULL) + if (sc != SC_NULL) { + VSLb(req->vsl, SLT_DeliveryError, "resp: \"%s\" %d \"%s\"", + sc->desc, errno, VAS_errtxt(errno)); Req_Fail(req, sc); + } } diff --git a/bin/varnishtest/tests/r03189.vtc b/bin/varnishtest/tests/r03189.vtc index cf3d466c9e..7d2dd35169 100644 --- a/bin/varnishtest/tests/r03189.vtc +++ b/bin/varnishtest/tests/r03189.vtc @@ -14,10 +14,14 @@ server s1 { chunkedlen 0 } -start -varnish v1 \ - -arg "-p idle_send_timeout=.1" \ - -arg "-p send_timeout=.8" \ - -vcl+backend { } -start +varnish v1 -cliok "param.set idle_send_timeout .1" +varnish v1 -cliok "param.set send_timeout .8" +varnish v1 -vcl+backend { } -start + +logexpect l1 -v v1 { + expect * * DeliveryError {resp: "Error transaction" \d+ ".*"} + expect 0 = Timestamp "Resp:" +} -start client c1 { txreq @@ -26,3 +30,5 @@ client c1 { barrier b sync expect_close } -run + +logexpect l1 -wait