[master] ca50ccd Start using the "transport" mechanism for esi includes
Poul-Henning Kamp
phk at FreeBSD.org
Thu May 14 18:17:46 CEST 2015
commit ca50ccd55d9cc6fa1b25e10ae3383b336e7bc81d
Author: Poul-Henning Kamp <phk at FreeBSD.org>
Date: Thu May 14 16:17:25 2015 +0000
Start using the "transport" mechanism for esi includes
diff --git a/bin/varnishd/cache/cache_esi_deliver.c b/bin/varnishd/cache/cache_esi_deliver.c
index 7f072ea..087af87 100644
--- a/bin/varnishd/cache/cache_esi_deliver.c
+++ b/bin/varnishd/cache/cache_esi_deliver.c
@@ -70,6 +70,7 @@ ved_include(struct req *preq, const char *src, const char *host)
struct worker *wrk;
struct req *req;
enum req_fsm_nxt s;
+ struct transport xp;
wrk = preq->wrk;
@@ -134,7 +135,9 @@ ved_include(struct req *preq, const char *src, const char *host)
req->crc = preq->crc;
req->l_crc = preq->l_crc;
- VDP_push(req, ved_vdp_bytes, preq, 0);
+ INIT_OBJ(&xp, TRANSPORT_MAGIC);
+ req->transport = &xp;
+ req->transport_priv = preq;
THR_SetRequest(req);
@@ -657,6 +660,7 @@ int
VED_Setup(struct req *req, struct busyobj *bo)
{
int i;
+ struct req *preq;
CHECK_OBJ_NOTNULL(req, REQ_MAGIC);
CHECK_OBJ_NOTNULL(req->objcore, OBJCORE_MAGIC);
@@ -677,6 +681,10 @@ VED_Setup(struct req *req, struct busyobj *bo)
if (req->esi_level == 0)
return (0);
+ CAST_OBJ_NOTNULL(preq, req->transport_priv, REQ_MAGIC);
+
+ VDP_push(req, ved_vdp_bytes, preq, 1);
+
req->res_mode |= RES_ESI_CHILD;
i = ObjCheckFlag(req->wrk, req->objcore, OF_GZIPED);
if (req->gzip_resp && i && !(req->res_mode & RES_ESI)) {
More information about the varnish-commit
mailing list