Commit bfb137cf authored by Nils Goroll's avatar Nils Goroll

fix assertion failure in vped_gzgz_init() because of GZIPBITS

waiting for the boc happened at the wrong place

***  v1   debug|Assert error in vped_gzgz_init(), foreign/cache_esi_deliver.c line 163:
***  v1   debug|  Condition(foo->start > 0 && foo->start < foo->olen * 8) not true.
parent f1254975
......@@ -2427,6 +2427,21 @@ vped_deliver(struct req *req, struct boc *boc, int wantbody)
if (boc == NULL && ObjGetLen(req->wrk, req->objcore) == 0)
goto clean; // XXX
/* XXX needed ??? */
i = ObjCheckFlag(req->wrk, req->objcore, OF_GZIPED);
if (parent->nexus.gzip.is && i && !(req->res_mode & RES_ESI)) {
/* OA_GZIPBITS are not valid until BOS_FINISHED */
if (boc != NULL)
ObjWaitState(req->objcore, BOS_FINISHED);
if (req->objcore->flags & OC_F_FAILED) {
/* No way of signalling errors in the middle of
the ESI body. Omit this ESI fragment. */
goto clean; // XXX
}
}
if ((req->objcore->flags & OC_F_FINAL) != 0 &&
!ObjHasAttr(req->wrk, req->objcore, OA_ESIDATA)) {
VSLdbg(req, "vped_deliver: T_FINAL");
......@@ -2519,20 +2534,6 @@ vped_deliver(struct req *req, struct boc *boc, int wantbody)
VSLdbg(req, "vped_deliver: ESI");
/* XXX needed ??? */
i = ObjCheckFlag(req->wrk, req->objcore, OF_GZIPED);
if (parent->nexus.gzip.is && i && !(req->res_mode & RES_ESI)) {
/* OA_GZIPBITS are not valid until BOS_FINISHED */
if (boc != NULL)
ObjWaitState(req->objcore, BOS_FINISHED);
if (req->objcore->flags & OC_F_FAILED) {
/* No way of signalling errors in the middle of
the ESI body. Omit this ESI fragment. */
goto clean; // XXX
}
}
VDP_Push(req, &VDP_pesi_buf, tree);
XXXAZ(push_vdps(req, &parent->nexus.gzip));
AN(parent);
......
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