Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
L
libvdp-pesi
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Jobs
Commits
Open sidebar
uplex-varnish
libvdp-pesi
Commits
3ab1faee
Commit
3ab1faee
authored
Oct 25, 2019
by
Geoff Simmons
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add the backend timeout test.
parent
61c2ab4a
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
75 additions
and
0 deletions
+75
-0
backend_timeout.vtc
src/tests/backend_timeout.vtc
+75
-0
No files found.
src/tests/backend_timeout.vtc
0 → 100644
View file @
3ab1faee
varnishtest "like e00003.vtc but backend timeout at ESI level 1"
server s1 {
rxreq
expect req.http.esi0 == "foo"
txresp -body {
<html>
Before include
<esi:include
src=
"/body"
sr=
"foo"
/>
After include
</html>
}
} -start
server s2 {
rxreq
expect req.url == "/body1"
expect req.http.esi0 != "foo"
delay 0.6
txresp -body {
Included file
}
} -start
varnish v1 -vcl+backend {
import ${vmod_pesi};
sub vcl_recv {
if (req.esi_level > 0) {
set req.url = req.url + req.esi_level;
} else {
set req.http.esi0 = "foo";
}
}
sub vcl_backend_fetch {
if (bereq.url == "/") {
set bereq.backend = s1;
}
else {
set bereq.backend = s2;
set bereq.first_byte_timeout = 0.5s;
}
}
sub vcl_backend_response {
if (bereq.url == "/") {
set beresp.do_esi = true;
}
}
sub vcl_deliver {
pesi.activate();
}
sub vcl_backend_error {
set beresp.body = "ouch!";
return(deliver);
}
} -start
client c1 {
txreq -hdr "Host: foo"
rxresp
expect resp.status == 200
expect resp.bodylen == 62
expect resp.body == {
<html>
Before include
ouch!
After include
</html>
}
} -run
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