Intermediate relief to avoid panic in VDP_bytes()

Due to a relatively recent change in varnish-cache, VDP_Close() in the
parallel esi thread can race VDP_Deliver in the deliver thread,
resulting in a panic.

See #19 for details
parent 92ec4800
......@@ -83,12 +83,12 @@ client c1 {
txreq -hdr "Host: foo"
rxresp
expect resp.status == 200
expect resp.bodylen == 73
expect resp.bodylen == 65
expect resp.body == {
<html>
Before include
ouch!
Included
After include
</html>
}
......
......@@ -1274,6 +1274,17 @@ vped_deliver(struct req *req, struct boc *boc, int wantbody)
INIT_OBJ(ctx, VRT_CTX_MAGIC);
VCL_Req2Ctx(ctx, req);
#ifndef ISSUE19_RELIEF
// #19 disable streaming for now
if (boc != NULL)
ObjWaitState(req->objcore, BOS_FINISHED);
if (req->objcore->flags & OC_F_FAILED) {
if (!pesi->pecx->incl_cont)
tree_latch_error(tree, -1);
return;
}
#endif
if (gz->is && obj_gzipped && !(req->res_mode & RES_ESI)) {
/* OA_GZIPBITS are not valid until BOS_FINISHED */
if (boc != NULL)
......
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