Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
V
varnish-cache
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Commits
Open sidebar
varnishcache
varnish-cache
Commits
d099d7f6
Unverified
Commit
d099d7f6
authored
Apr 05, 2020
by
Nils Goroll
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
esi can be turned off at esi_level > 0
parent
68ce690c
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
12 additions
and
4 deletions
+12
-4
cache_vrt_var.c
bin/varnishd/cache/cache_vrt_var.c
+2
-4
e00015.vtc
bin/varnishtest/tests/e00015.vtc
+10
-0
No files found.
bin/varnishd/cache/cache_vrt_var.c
View file @
d099d7f6
...
@@ -538,6 +538,8 @@ VRT_l_req_esi(VRT_CTX, VCL_BOOL process_esi)
...
@@ -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
* Only allow you to turn of esi in the main request
* else everything gets confused
* 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
))
if
(
IS_TOPREQ
(
ctx
->
req
))
ctx
->
req
->
disable_esi
=
!
process_esi
;
ctx
->
req
->
disable_esi
=
!
process_esi
;
...
@@ -874,10 +876,6 @@ VRT_l_resp_do_esi(VRT_CTX, VCL_BOOL 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
,
VRT_CTX_MAGIC
);
CHECK_OBJ_NOTNULL
(
ctx
->
req
,
REQ_MAGIC
);
CHECK_OBJ_NOTNULL
(
ctx
->
req
,
REQ_MAGIC
);
assert
(
ctx
->
syntax
>=
41
);
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
;
ctx
->
req
->
disable_esi
=
!
process_esi
;
}
}
...
...
bin/varnishtest/tests/e00015.vtc
View file @
d099d7f6
...
@@ -58,6 +58,14 @@ server s1 {
...
@@ -58,6 +58,14 @@ server s1 {
<esi:include
src=
"/body"
/>
<esi:include
src=
"/body"
/>
After include
After include
}
}
rxreq
expect req.url == /recurse
txresp -body {
<html>
Before include
<esi:include
src=
"/top2"
/>
After include
}
} -start
} -start
varnish v1 -syntax 4.1 -vcl+backend {
varnish v1 -syntax 4.1 -vcl+backend {
...
@@ -83,6 +91,8 @@ client c1 {
...
@@ -83,6 +91,8 @@ client c1 {
expect resp.bodylen == 76
expect resp.bodylen == 76
expect resp.status == 200
expect resp.status == 200
expect resp.http.was == true
expect resp.http.was == true
txreq -url "/recurse"
rxresp
} -run
} -run
varnish v1 -expect esi_errors == 0
varnish v1 -expect esi_errors == 0
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment