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
2ab29dc4
Unverified
Commit
2ab29dc4
authored
Apr 05, 2020
by
Nils Goroll
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Test resp.filters with esi, gunzip and range
parent
d099d7f6
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
30 additions
and
3 deletions
+30
-3
e00015.vtc
bin/varnishtest/tests/e00015.vtc
+30
-3
No files found.
bin/varnishtest/tests/e00015.vtc
View file @
2ab29dc4
varnishtest "ESI requests turned off"
varnishtest "ESI requests turned off
and other filters with esi
"
server s1 {
server s1 {
rxreq
rxreq
...
@@ -52,7 +52,7 @@ varnish v1 -expect esi_errors == 0
...
@@ -52,7 +52,7 @@ varnish v1 -expect esi_errors == 0
server s1 {
server s1 {
rxreq
rxreq
expect req.url == /top2
expect req.url == /top2
txresp -body {
txresp -
gzip
body {
<html>
<html>
Before include
Before include
<esi:include
src=
"/body"
/>
<esi:include
src=
"/body"
/>
...
@@ -60,7 +60,7 @@ server s1 {
...
@@ -60,7 +60,7 @@ server s1 {
}
}
rxreq
rxreq
expect req.url == /recurse
expect req.url == /recurse
txresp -body {
txresp -
gzip
body {
<html>
<html>
Before include
Before include
<esi:include
src=
"/top2"
/>
<esi:include
src=
"/top2"
/>
...
@@ -74,25 +74,52 @@ varnish v1 -syntax 4.1 -vcl+backend {
...
@@ -74,25 +74,52 @@ varnish v1 -syntax 4.1 -vcl+backend {
if (req.url == "/top2") {
if (req.url == "/top2") {
set resp.do_esi = false;
set resp.do_esi = false;
}
}
set resp.http.filters = resp.filters;
}
}
sub vcl_backend_response {
sub vcl_backend_response {
set beresp.do_esi = true;
set beresp.do_esi = true;
}
}
}
}
# Note on Range requests: The range VDP is active, but as it cannot
# reliably determine the size of the response, it falls back to a 200
client c1 {
client c1 {
txreq -url /top2
txreq -url /top2
rxresp
rxresp
expect resp.bodylen == 73
expect resp.bodylen == 73
expect resp.status == 200
expect resp.status == 200
expect resp.http.was == true
expect resp.http.was == true
expect resp.http.filters == "gunzip"
txreq -url "/esi"
txreq -url "/esi"
rxresp
rxresp
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
expect resp.http.filters == "esi"
# see Note on Range above
txreq -url "/esi" -hdr "Range: bytes=1-2"
rxresp
expect resp.bodylen == 76
expect resp.status == 200
expect resp.http.was == true
expect resp.http.filters == "esi range"
txreq -url "/recurse"
txreq -url "/recurse"
rxresp
rxresp
expect resp.bodylen == 120
expect resp.status == 200
expect resp.http.was == true
expect resp.http.filters == "esi gunzip"
# see Note on Range above
txreq -url "/recurse" -hdr "Range: bytes=1-2"
rxresp
expect resp.bodylen == 120
expect resp.status == 200
expect resp.http.was == true
expect resp.http.filters == "esi gunzip range"
} -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