]> err.no Git - varnish/commitdiff
Unify logging in the response handling
authorphk <phk@d4fa192b-c00b-0410-8231-f00ffab90ce4>
Wed, 5 Jul 2006 09:32:12 +0000 (09:32 +0000)
committerphk <phk@d4fa192b-c00b-0410-8231-f00ffab90ce4>
Wed, 5 Jul 2006 09:32:12 +0000 (09:32 +0000)
git-svn-id: svn+ssh://projects.linpro.no/svn/varnish/trunk@314 d4fa192b-c00b-0410-8231-f00ffab90ce4

varnish-cache/bin/varnishd/cache_acceptor.c
varnish-cache/bin/varnishd/cache_fetch.c
varnish-cache/bin/varnishd/cache_pool.c

index 03f290f91338c1b43a390e7a5924fad18f7d1652..f36a4a2c94f6160fcef8f885e145bb3e5f86f5e2 100644 (file)
@@ -91,6 +91,9 @@ vca_write_obj(struct sess *sp, char *b, unsigned l)
        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);
index 5a3b8fe0f0f40921777a20079d1421665ea00c38..e27f3097dfc291c5ed2c846ce96ed140dce81ff3 100644 (file)
@@ -289,9 +289,6 @@ FetchSession(struct worker *w, struct sess *sp)
        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"))
index e733f88ffe05889da6e82b6e4d633de1a40d7010..ae8118be76a6ebb30a10fef3453f08b693d69ccc 100644 (file)
@@ -50,8 +50,6 @@ DeliverSession(struct worker *w, struct sess *sp)
 {
 
 
-       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;