[3.0] 8213a0b Don't medd up the t_open and t_resp when handling ESI subrequests.

Martin Blix Grydeland martin at varnish-software.com
Fri May 16 14:55:32 CEST 2014


commit 8213a0b3c7a779ee505db7467ed7f2dadfd70012
Author: Martin Blix Grydeland <martin at varnish-software.com>
Date:   Fri May 16 14:53:26 2014 +0200

    Don't medd up the t_open and t_resp when handling ESI subrequests.
    
    ESI subrequests would mangle the t_open and t_resp timestamps of the
    original requests, causing negative time and NAN being logged in
    ReqEnd.
    
    Fixes: #1297

diff --git a/bin/varnishd/cache_center.c b/bin/varnishd/cache_center.c
index d0f3bf2..22edb9b 100644
--- a/bin/varnishd/cache_center.c
+++ b/bin/varnishd/cache_center.c
@@ -350,8 +350,6 @@ cnt_done(struct sess *sp)
 		    sp->xid, sp->t_req, sp->t_end, dh, dp, da);
 	}
 	sp->xid = 0;
-	sp->t_open = sp->t_end;
-	sp->t_resp = NAN;
 	WSL_Flush(sp->wrk, 0);
 
 	/* If we did an ESI include, don't mess up our state */
@@ -360,7 +358,9 @@ cnt_done(struct sess *sp)
 
 	memset(&sp->acct_req, 0, sizeof sp->acct_req);
 
+	sp->t_open = sp->t_end;
 	sp->t_req = NAN;
+	sp->t_resp = NAN;
 	sp->hash_always_miss = 0;
 	sp->hash_ignore_busy = 0;
 



More information about the varnish-commit mailing list