r934 - trunk/varnish-cache/bin/varnishd

phk at projects.linpro.no phk at projects.linpro.no
Thu Sep 7 00:02:07 CEST 2006


Author: phk
Date: 2006-09-07 00:02:07 +0200 (Thu, 07 Sep 2006)
New Revision: 934

Modified:
   trunk/varnish-cache/bin/varnishd/cache_response.c
Log:
Account for header bytes in error and 304 responses.

Remove unhelpful debug entry.


Modified: trunk/varnish-cache/bin/varnishd/cache_response.c
===================================================================
--- trunk/varnish-cache/bin/varnishd/cache_response.c	2006-09-06 21:52:50 UTC (rev 933)
+++ trunk/varnish-cache/bin/varnishd/cache_response.c	2006-09-06 22:02:07 UTC (rev 934)
@@ -126,7 +126,7 @@
 		"</HTML>\r\n");
 	vsb_finish(sb);
 	WRK_Reset(sp->wrk, &sp->fd);
-	WRK_Write(sp->wrk, vsb_data(sb), vsb_len(sb));
+	sp->wrk->acct.hdrbytes += WRK_Write(sp->wrk, vsb_data(sb), vsb_len(sb));
 	WRK_Flush(sp->wrk);
 	VSL(SLT_TxResponse, sp->id, "%d", code);
 	VSL(SLT_TxProtocol, sp->id, "HTTP/1.1");
@@ -157,7 +157,7 @@
 	if (sp->doclose != NULL)
 		http_SetHeader(sp->fd, sp->http, "Connection: close");
 	WRK_Reset(sp->wrk, &sp->fd);
-	http_Write(sp->wrk, sp->http, 1);
+	sp->wrk->acct.hdrbytes += http_Write(sp->wrk, sp->http, 1);
 	if (WRK_Flush(sp->wrk))
 		vca_close_session(sp, "remote closed");
 }
@@ -180,8 +180,6 @@
 			    "Cond: %d > %d ", sp->obj->last_modified, ims);
 			return (0);
 		}
-		VSL(SLT_Debug, sp->fd,
-		    "Cond: %d <= %d", sp->obj->last_modified, ims);
 		res_do_304(sp);
 		return (1);
 	}




More information about the varnish-commit mailing list