Commit 03fdfd18 authored by Geoff Simmons's avatar Geoff Simmons

activate() adds pesi even when the ESIDATA attribute is not set.

There may be a race, by which the attribute is not set when activate()
is invoked, resulting in no pesi processing on the response. But in
fact the response does contain ESI includes, and the attribute gets set
later. With the result that unresolved ESI includes appear in the
response.

The VDP will catch this, because it checks the object attribute
again in vdp_init, and continues only if it is set.
parent b1b2c9fd
......@@ -207,10 +207,18 @@ pesi_resp_default_filter_list(void *arg, struct vsb *vsb)
* busy objects
*
* pesi will still do the right thing if the response really is empty
*
* the ESIDATA attribute check has been removed because we it may
* be racy, not set at this time when it should be, so that "pesi"
* is not added to resp.filters, and ESI includes go unresolved
*
* the VDP will still do the right thing at init time, because it
* checks the attribute again. Now however, the VDP may be
* initiated more often than otherwise would have been necessary.
*/
if (!req->disable_esi && /* req->resp_len != 0 && */
ObjHasAttr(req->wrk, req->objcore, OA_ESIDATA))
if (!req->disable_esi /* && req->resp_len != 0 &&
ObjHasAttr(req->wrk, req->objcore, OA_ESIDATA) */)
VSB_cat(vsb, " pesi");
if (cache_param->http_gzip_support &&
......
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