[master] 503a643 Move the responsibility for conclusively deciding beresp->body_status to the VDIR.

Poul-Henning Kamp phk at FreeBSD.org
Wed Sep 20 19:01:04 UTC 2017


commit 503a64302d7a4160cbf9f15bfedd265a352f14d7
Author: Poul-Henning Kamp <phk at FreeBSD.org>
Date:   Wed Sep 20 13:51:32 2017 +0000

    Move the responsibility for conclusively deciding beresp->body_status
    to the VDIR.

diff --git a/bin/varnishd/cache/cache_fetch.c b/bin/varnishd/cache/cache_fetch.c
index 0dc81de..2715c91 100644
--- a/bin/varnishd/cache/cache_fetch.c
+++ b/bin/varnishd/cache/cache_fetch.c
@@ -304,7 +304,6 @@ vbf_stp_startfetch(struct worker *wrk, struct busyobj *bo)
 
 	http_VSL_log(bo->beresp);
 
-	RFC2616_Response_Body(wrk, bo);
 	if (bo->htc->body_status == BS_ERROR) {
 		bo->htc->doclose = SC_RX_BODY;
 		VDI_Finish(bo->wrk, bo);
diff --git a/bin/varnishd/http1/cache_http1_fetch.c b/bin/varnishd/http1/cache_http1_fetch.c
index e5032eb..87a3194 100644
--- a/bin/varnishd/http1/cache_http1_fetch.c
+++ b/bin/varnishd/http1/cache_http1_fetch.c
@@ -201,6 +201,7 @@ V1F_FetchRespHdr(struct busyobj *bo)
 	}
 
 	htc->doclose = http_DoConnection(hp);
+	RFC2616_Response_Body(bo->wrk, bo);
 
 	return (0);
 }


More information about the varnish-commit mailing list