Prepare for onerror= support

This change does not do anything yet, it just saves the abort flag.

Ref varnish-cache:
- 26097fb091496f79ef9a38b22e3639735fb39280
- a8449faff23a3c29d19781998fa5f2ee7ce110af
parent 378a7c35
......@@ -50,6 +50,7 @@ struct pecx {
ssize_t l;
int state;
int abrt;
};
struct pesi {
......
......@@ -908,7 +908,7 @@ vdp_pesi_bytes(struct vdp_ctx *vdx, enum vdp_action act, void **priv,
struct nexus_gzip *parent_gzip = NULL;
struct bytes_tree *tree;
struct node *node, *child = NULL;
int retval = 0, parallel;
int abrt, retval = 0, parallel;
CHECK_OBJ_NOTNULL(vdx, VDP_CTX_MAGIC);
......@@ -953,6 +953,7 @@ vdp_pesi_bytes(struct vdp_ctx *vdx, enum vdp_action act, void **priv,
pp = ptr;
while (1) {
abrt = 0;
switch (pecx->state) {
case 0:
pecx->p = ObjGetAttr(req->wrk, req->objcore,
......@@ -1026,7 +1027,10 @@ vdp_pesi_bytes(struct vdp_ctx *vdx, enum vdp_action act, void **priv,
Debug("SKIP1(%d)\n", (int)pecx->l);
pecx->state = 4;
break;
case VEC_INCL:
case VEC_IA:
abrt = FEATURE(FEATURE_ESI_INCLUDE_ONERROR);
/* FALLTHROUGH */
case VEC_IC:
pecx->p++;
q = (void*)strchr((const char*)pecx->p, '\0');
AN(q);
......@@ -1044,6 +1048,7 @@ vdp_pesi_bytes(struct vdp_ctx *vdx, enum vdp_action act, void **priv,
node_insert(tree, node, child);
pesi->pecx->abrt = abrt;
VSLdbg(vdx, "vped_vdp: call vped_include");
parallel =
vped_include(req, (const char*)q,
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment