Skip to content

Commit

Permalink
v1d: Log delivery errors
Browse files Browse the repository at this point in the history
  • Loading branch information
dridi committed Jan 29, 2024
1 parent 3233bd2 commit 3d6fd2f
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 5 deletions.
5 changes: 4 additions & 1 deletion bin/varnishd/http1/cache_http1_deliver.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
}
14 changes: 10 additions & 4 deletions bin/varnishtest/tests/r03189.vtc
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -26,3 +30,5 @@ client c1 {
barrier b sync
expect_close
} -run

logexpect l1 -wait

0 comments on commit 3d6fd2f

Please sign in to comment.