esi can be turned off at esi_level > 0

parent 68ce690c
......@@ -538,6 +538,8 @@ VRT_l_req_esi(VRT_CTX, VCL_BOOL process_esi)
/*
* Only allow you to turn of esi in the main request
* else everything gets confused
* NOTE: this is not true, but we do not change behavior
* for vcl 4.0. For 4.1, see VRT_l_resp_do_esi()
*/
if (IS_TOPREQ(ctx->req))
ctx->req->disable_esi = !process_esi;
......@@ -874,10 +876,6 @@ VRT_l_resp_do_esi(VRT_CTX, VCL_BOOL process_esi)
CHECK_OBJ_NOTNULL(ctx, VRT_CTX_MAGIC);
CHECK_OBJ_NOTNULL(ctx->req, REQ_MAGIC);
assert(ctx->syntax >= 41);
/*
* Only allow you to turn of esi in the main request
* else everything gets confused
*/
ctx->req->disable_esi = !process_esi;
}
......
......@@ -58,6 +58,14 @@ server s1 {
<esi:include src="/body"/>
After include
}
rxreq
expect req.url == /recurse
txresp -body {
<html>
Before include
<esi:include src="/top2"/>
After include
}
} -start
varnish v1 -syntax 4.1 -vcl+backend {
......@@ -83,6 +91,8 @@ client c1 {
expect resp.bodylen == 76
expect resp.status == 200
expect resp.http.was == true
txreq -url "/recurse"
rxresp
} -run
varnish v1 -expect esi_errors == 0
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