From: phk Date: Wed, 6 Sep 2006 22:02:07 +0000 (+0000) Subject: Account for header bytes in error and 304 responses. X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=e861f55005b081c20992759a13307d2337758e7a;p=varnish Account for header bytes in error and 304 responses. Remove unhelpful debug entry. git-svn-id: svn+ssh://projects.linpro.no/svn/varnish/trunk@934 d4fa192b-c00b-0410-8231-f00ffab90ce4 --- diff --git a/varnish-cache/bin/varnishd/cache_response.c b/varnish-cache/bin/varnishd/cache_response.c index 8d4f8032..0a75248b 100644 --- a/varnish-cache/bin/varnishd/cache_response.c +++ b/varnish-cache/bin/varnishd/cache_response.c @@ -126,7 +126,7 @@ RES_Error(struct sess *sp, int code, const char *expl) "\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 @@ res_do_304(struct sess *sp) 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 @@ res_do_conds(struct sess *sp) "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); }