ESI: Use response status modulo 1000

fixes https://github.com/varnishcache/varnish-cache/issues/3958
parent b7e6a48e
......@@ -1223,6 +1223,7 @@ vped_deliver(struct req *req, struct boc *boc, int wantbody)
struct nexus_gzip *gz;
struct vped_gzgz_priv *vgzgz = NULL;
struct vrt_ctx ctx[1];
uint16_t status;
VSLdbgv(req, "vped_deliver: req=%p boc=%p wantbody=%d", req, boc,
wantbody);
......@@ -1243,9 +1244,8 @@ vped_deliver(struct req *req, struct boc *boc, int wantbody)
req, boc, wantbody, pesi->pecx->incl_cont);
assert(parent->type == T_NEXUS);
if (!pesi->pecx->incl_cont &&
req->resp->status != 200 &&
req->resp->status != 204) {
status = req->resp->status % 1000;
if (!pesi->pecx->incl_cont && status != 200 && status != 204) {
tree_latch_error(tree, -1);
return;
}
......
......@@ -118,7 +118,7 @@ VOID activate()
Enable parallel ESI processing for the client response.
Restricted to: ``vcl_deliver``
Restricted to: ``vcl_deliver``.
If ``pesi.activate()`` is called on *any* ESI level (any depth of include
nesting), then it MUST be called on *all* levels of the response. If
......@@ -205,7 +205,7 @@ identified by the ENUM ``parameter``. Currently the parameters can
only be set with a boolean value in ``bool`` (but future versions of
this function may allow for setting other data types).
Restricted to: ``vcl_deliver``
Restricted to: ``vcl_deliver``.
The parameters that can be set are currently ``serial`` and ``thread``:
......
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