r314 - trunk/varnish-cache/bin/varnishd

phk at projects.linpro.no phk at projects.linpro.no
Wed Jul 5 11:32:13 CEST 2006


Author: phk
Date: 2006-07-05 11:32:12 +0200 (Wed, 05 Jul 2006)
New Revision: 314

Modified:
   trunk/varnish-cache/bin/varnishd/cache_acceptor.c
   trunk/varnish-cache/bin/varnishd/cache_fetch.c
   trunk/varnish-cache/bin/varnishd/cache_pool.c
Log:
Unify logging in the response handling 


Modified: trunk/varnish-cache/bin/varnishd/cache_acceptor.c
===================================================================
--- trunk/varnish-cache/bin/varnishd/cache_acceptor.c	2006-07-05 09:11:01 UTC (rev 313)
+++ trunk/varnish-cache/bin/varnishd/cache_acceptor.c	2006-07-05 09:32:12 UTC (rev 314)
@@ -91,6 +91,9 @@
 	unsigned u = 0;
 	char *r;
 
+	VSL(SLT_Response, sp->fd, "%u", sp->obj->response);
+	VSL(SLT_Length, sp->fd, "%u", sp->obj->len);
+
 	if (l == 0)
 		l = strlen(b);
 	vca_write(sp, b, l);

Modified: trunk/varnish-cache/bin/varnishd/cache_fetch.c
===================================================================
--- trunk/varnish-cache/bin/varnishd/cache_fetch.c	2006-07-05 09:11:01 UTC (rev 313)
+++ trunk/varnish-cache/bin/varnishd/cache_fetch.c	2006-07-05 09:32:12 UTC (rev 314)
@@ -289,9 +289,6 @@
 	sbuf_finish(w->sb);
 	sp->obj->header = strdup(sbuf_data(w->sb));
 
-	VSL(SLT_Response, sp->fd, "%u", sp->obj->response);
-	VSL(SLT_Length, sp->fd, "%u", sp->obj->len);
-
 	vca_write_obj(sp, sp->obj->header, 0);
 
 	if (http_GetHdr(hp, "Connection", &b) && !strcasecmp(b, "close"))

Modified: trunk/varnish-cache/bin/varnishd/cache_pool.c
===================================================================
--- trunk/varnish-cache/bin/varnishd/cache_pool.c	2006-07-05 09:11:01 UTC (rev 313)
+++ trunk/varnish-cache/bin/varnishd/cache_pool.c	2006-07-05 09:32:12 UTC (rev 314)
@@ -50,8 +50,6 @@
 {
 
 
-	VSL(SLT_Response, sp->fd, "%u", sp->obj->response);
-	VSL(SLT_Length, sp->fd, "%u", sp->obj->len);
 	vca_write_obj(sp, sp->obj->header, 0);
 	HSH_Deref(sp->obj);
 	sp->obj = NULL;




More information about the varnish-commit mailing list