[4.1] e9f7443 Make esi-delivery responsible for its own header-mungings.

Poul-Henning Kamp phk at FreeBSD.org
Mon Sep 28 13:31:06 CEST 2015


commit e9f7443473327832876d0e8c751d7e56468c6e24
Author: Poul-Henning Kamp <phk at FreeBSD.org>
Date:   Tue Sep 15 08:30:46 2015 +0000

    Make esi-delivery responsible for its own header-mungings.

diff --git a/bin/varnishd/cache/cache_esi_deliver.c b/bin/varnishd/cache/cache_esi_deliver.c
index 1580ec0..c5d3a44 100644
--- a/bin/varnishd/cache/cache_esi_deliver.c
+++ b/bin/varnishd/cache/cache_esi_deliver.c
@@ -237,6 +237,9 @@ VDP_ESI(struct req *req, enum vdp_action act, void **priv,
 		AN(ecx);
 		ecx->preq = req;
 		*priv = ecx;
+		RFC2616_Weaken_Etag(req->resp);
+		if (req->resp_len != 0)
+			req->resp_len = -1;
 		return (0);
 	}
 	CAST_OBJ_NOTNULL(ecx, *priv, ECX_MAGIC);
diff --git a/bin/varnishd/cache/cache_req_fsm.c b/bin/varnishd/cache/cache_req_fsm.c
index 2763f7b..92cb781 100644
--- a/bin/varnishd/cache/cache_req_fsm.c
+++ b/bin/varnishd/cache/cache_req_fsm.c
@@ -79,8 +79,6 @@ cnt_vdp(struct req *req, struct busyobj *bo)
 	if (!req->disable_esi && req->resp_len != 0 && wantbody &&
 	    ObjGetattr(req->wrk, req->objcore, OA_ESIDATA, NULL) != NULL) {
 		req->res_mode |= RES_ESI;
-		RFC2616_Weaken_Etag(req->resp);
-		req->resp_len = -1;
 		VDP_push(req, VDP_ESI, NULL, 0);
 	}
 



More information about the varnish-commit mailing list