From: phk Date: Fri, 13 Jul 2007 15:31:37 +0000 (+0000) Subject: Fix 304 responses, they got messed up in the vcl_deliver() addition. X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=8a9c657166ecf4d89703b27cef6e97230e3b70aa;p=varnish Fix 304 responses, they got messed up in the vcl_deliver() addition. git-svn-id: svn+ssh://projects.linpro.no/svn/varnish/trunk@1694 d4fa192b-c00b-0410-8231-f00ffab90ce4 --- diff --git a/varnish-cache/bin/varnishd/cache_response.c b/varnish-cache/bin/varnishd/cache_response.c index 0a0b1ba1..d59ac6e2 100644 --- a/varnish-cache/bin/varnishd/cache_response.c +++ b/varnish-cache/bin/varnishd/cache_response.c @@ -69,8 +69,7 @@ res_do_304(struct sess *sp) http_ClrHeader(sp->http); sp->http->logtag = HTTP_Tx; - http_SetResp(sp->http, - "HTTP/1.1", "304", "Not Modified"); + http_SetResp(sp->http, "HTTP/1.1", "304", "Not Modified"); TIM_format(sp->t_req, lm); http_PrintfHeader(sp->wrk, sp->fd, sp->http, "Date: %s", lm); http_SetHeader(sp->wrk, sp->fd, sp->http, "Via: 1.1 varnish"); @@ -81,8 +80,7 @@ res_do_304(struct sess *sp) http_SetHeader(sp->wrk, sp->fd, sp->http, "Connection: close"); WRK_Reset(sp->wrk, &sp->fd); sp->wrk->acct.hdrbytes += http_Write(sp->wrk, sp->http, 1); - if (WRK_Flush(sp->wrk)) - vca_close_session(sp, "remote closed"); + sp->wantbody = 0; } /*--------------------------------------------------------------------*/