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) ...@@ -1223,6 +1223,7 @@ vped_deliver(struct req *req, struct boc *boc, int wantbody)
struct nexus_gzip *gz; struct nexus_gzip *gz;
struct vped_gzgz_priv *vgzgz = NULL; struct vped_gzgz_priv *vgzgz = NULL;
struct vrt_ctx ctx[1]; struct vrt_ctx ctx[1];
uint16_t status;
VSLdbgv(req, "vped_deliver: req=%p boc=%p wantbody=%d", req, boc, VSLdbgv(req, "vped_deliver: req=%p boc=%p wantbody=%d", req, boc,
wantbody); wantbody);
...@@ -1243,9 +1244,8 @@ vped_deliver(struct req *req, struct boc *boc, int wantbody) ...@@ -1243,9 +1244,8 @@ vped_deliver(struct req *req, struct boc *boc, int wantbody)
req, boc, wantbody, pesi->pecx->incl_cont); req, boc, wantbody, pesi->pecx->incl_cont);
assert(parent->type == T_NEXUS); assert(parent->type == T_NEXUS);
if (!pesi->pecx->incl_cont && status = req->resp->status % 1000;
req->resp->status != 200 && if (!pesi->pecx->incl_cont && status != 200 && status != 204) {
req->resp->status != 204) {
tree_latch_error(tree, -1); tree_latch_error(tree, -1);
return; return;
} }
......
...@@ -118,7 +118,7 @@ VOID activate() ...@@ -118,7 +118,7 @@ VOID activate()
Enable parallel ESI processing for the client response. 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 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 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 ...@@ -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 only be set with a boolean value in ``bool`` (but future versions of
this function may allow for setting other data types). 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``: 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