[Varnish] #1388: Length is 0 for most responses
Varnish
varnish-bugs at varnish-cache.org
Mon Jan 6 19:52:58 CET 2014
#1388: Length is 0 for most responses
--------------------+------------------------------
Reporter: scoof | Owner:
Type: defect | Status: new
Priority: normal | Milestone: Varnish 4.0-TP1
Component: build | Version: unknown
Severity: normal | Resolution:
Keywords: |
--------------------+------------------------------
Comment (by scoof):
This seems to be caused by SES_Charge being run after SLT_Length is logged
in cache_req_fsm.c. Suggested fix:
{{{
diff --git a/bin/varnishd/cache/cache_req_fsm.c
b/bin/varnishd/cache/cache_req_fsm.c
index d80c16f..b1d7416 100644
--- a/bin/varnishd/cache/cache_req_fsm.c
+++ b/bin/varnishd/cache/cache_req_fsm.c
@@ -865,6 +865,9 @@ CNT_Request(struct worker *wrk, struct req *req)
CHECK_OBJ_ORNULL(wrk->nobjhead, OBJHEAD_MAGIC);
}
if (nxt == REQ_FSM_DONE) {
+ /* done == 2 was charged by cache_hash.c */
+ SES_Charge(wrk, req);
+
/* XXX: Workaround for pipe */
if (req->sp->fd >= 0) {
VSLb(req->vsl, SLT_Length, "%ju",
@@ -883,9 +886,6 @@ CNT_Request(struct worker *wrk, struct req *req)
STV_free(st);
}
- /* done == 2 was charged by cache_hash.c */
- SES_Charge(wrk, req);
-
/*
* Nuke the VXID, cache_http1_fsm.c::http1_dissect() will
* allocate a new one when necessary.
}}}
--
Ticket URL: <https://www.varnish-cache.org/trac/ticket/1388#comment:4>
Varnish <https://varnish-cache.org/>
The Varnish HTTP Accelerator
More information about the varnish-bugs
mailing list