Fix up the worker in the VDP context as well

vmod_pesi works by saving the resulting data from a sub request to a
tree structure, which gets delivered to the client in the top
request's thread, once it is ready.

For cacheable objects which do not require ESI processing, we simply
keep the original request with an additional reference to the object.
So basically we hand delivery from one worker to another.

subreq_fixup() is responsible for converting the saved request to a
state as if it was handled by the request handling the top level
request, so one of the changes it applies is to change the wrk pointer
to the worker of the top level request.

Yet that change was incomplete and we missed an additional pointer in
struct vdp_ctx.

This should hopefully fix #14
parent 6af28b5d
......@@ -550,6 +550,7 @@ subreq_fixup(struct node *node, struct req *req)
assert(node->type == T_SUBREQ);
subreq = subreq_fixup_oc(node);
......@@ -563,6 +564,9 @@ subreq_fixup(struct node *node, struct req *req)
subreq->top->topreq = req;
subreq->vdc->wrk = req->wrk;
return (subreq);
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