r1181 - in branches/1.0: . bin/varnishd

des at projects.linpro.no des at projects.linpro.no
Wed Oct 18 16:27:11 CEST 2006


Author: des
Date: 2006-10-18 16:27:11 +0200 (Wed, 18 Oct 2006)
New Revision: 1181

Modified:
   branches/1.0/
   branches/1.0/bin/varnishd/cache_response.c
Log:
 r32844 at cat (orig r1142):  des | 2006-10-06 14:58:04 +0200
 The delivered document's age should be computed relative to the time of
 the response, not the time of the request.  If the document was not in
 cache and the backend took a long time to respond, the document would
 end up with a negative computed age, which when printed with %u would
 appear as a large positive number (a few seconds short of either 2^32
 or 2^64 depending on the size of time_t).



Property changes on: branches/1.0
___________________________________________________________________
Name: svk:merge
   - d4fa192b-c00b-0410-8231-f00ffab90ce4:/trunk/varnish-cache:1141
   + d4fa192b-c00b-0410-8231-f00ffab90ce4:/trunk/varnish-cache:1142

Modified: branches/1.0/bin/varnishd/cache_response.c
===================================================================
--- branches/1.0/bin/varnishd/cache_response.c	2006-10-18 14:27:10 UTC (rev 1180)
+++ branches/1.0/bin/varnishd/cache_response.c	2006-10-18 14:27:11 UTC (rev 1181)
@@ -234,7 +234,7 @@
 	else
 		http_PrintfHeader(sp->wrk, sp->fd, sp->http, "X-Varnish: %u", sp->xid);
 	http_PrintfHeader(sp->wrk, sp->fd, sp->http, "Age: %u",
-	    sp->obj->age + sp->t_req.tv_sec - sp->obj->entered);
+	    sp->obj->age + sp->t_resp.tv_sec - sp->obj->entered);
 	http_SetHeader(sp->wrk, sp->fd, sp->http, "Via: 1.1 varnish");
 	if (sp->doclose != NULL)
 		http_SetHeader(sp->wrk, sp->fd, sp->http, "Connection: close");




More information about the varnish-commit mailing list