[master] a72ab6c We don't have a vsl when coming from error in HTTP1_Session()
Nils Goroll
nils.goroll at uplex.de
Mon Jun 1 13:54:17 CEST 2015
commit a72ab6cf297b97b25d7a392ef0202b8cfec8a6a0
Author: Nils Goroll <nils.goroll at uplex.de>
Date: Mon Jun 1 13:50:04 2015 +0200
We don't have a vsl when coming from error in HTTP1_Session()
Fixes #1745
diff --git a/bin/varnishd/cache/cache_req.c b/bin/varnishd/cache/cache_req.c
index 4f02e26..f4e4f61 100644
--- a/bin/varnishd/cache/cache_req.c
+++ b/bin/varnishd/cache/cache_req.c
@@ -167,11 +167,12 @@ Req_Cleanup(struct sess *sp, struct worker *wrk, struct req *req)
VRTPRIV_dynamic_kill(sp->privs, (uintptr_t)&req->top);
/* Charge and log byte counters */
- AN(req->vsl->wid);
- CNT_AcctLogCharge(wrk->stats, req);
+ if (req->vsl->wid) {
+ CNT_AcctLogCharge(wrk->stats, req);
+ VSL_End(req->vsl);
+ }
req->req_bodybytes = 0;
- VSL_End(req->vsl);
if (!isnan(req->t_prev) && req->t_prev > 0.)
sp->t_idle = req->t_prev;
More information about the varnish-commit
mailing list