Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
S
slash
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
uplex-varnish
slash
Commits
f84afcdd
Unverified
Commit
f84afcdd
authored
Oct 30, 2023
by
Nils Goroll
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add b62.vtc
parent
2bcc41c3
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
75 additions
and
0 deletions
+75
-0
Makefile.am
src/Makefile.am
+1
-0
fellow_b00062.vtc
src/vtc/fellow_b00062.vtc
+74
-0
No files found.
src/Makefile.am
View file @
f84afcdd
...
...
@@ -146,6 +146,7 @@ VTC_TESTS = \
vtc/buddy_c00097.vtc
\
vtc/buddy_t02005.vtc
\
vtc/fellow_vcl.vtc
\
vtc/fellow_b00062.vtc
\
vtc/fellow_global.vtc
\
vtc/fellow_global_shared.vtc
\
vtc/fellow_coverage.vtc
\
...
...
src/vtc/fellow_b00062.vtc
0 → 100644
View file @
f84afcdd
varnishtest "Test that we properly wait for certain 304 cases"
server s1 {
rxreq
txresp -hdr "Last-Modified: Wed, 11 Sep 2013 13:36:55 GMT" -body "Geoff Still Rules"
# The IMS request we will spend some time to process for the sake of
# this test.
rxreq
expect req.http.if-modified-since == "Wed, 11 Sep 2013 13:36:55 GMT"
delay 1
txresp -status 304
# Last request, to a different URL to catch it if varnish asks for "/" too many times
rxreq
expect req.url == "/2"
txresp -body "x"
} -start
varnish v1 \
-arg "-jnone " \
-arg "-p debug=+syncvsl" \
-arg "-E${libvmod_slash}" \
-arg "-sfellow=fellow,${tmpdir}/fellow_global.stv,100MB,1MB,64KB" \
-vcl+backend {
sub vcl_backend_response {
set beresp.ttl = 1s;
set beresp.grace = 1s;
set beresp.keep = 1m;
set beresp.http.was-304 = beresp.was_304;
}
} -start
client c1 {
txreq
rxresp
expect resp.status == 200
expect resp.body == "Geoff Still Rules"
} -run
# let the object's ttl and grace expire
delay 2.1
# first client to ask for kept object - this should start the second request
client c2 {
txreq
rxresp
# we did not disable grace in the request, so we should get the graced object here
expect resp.status == 200
expect resp.body == "Geoff Still Rules"
} -start
delay .1
# second client to ask for the kept object. Here we want to wait until the backend fetch completes, not do a pass.
client c3 {
txreq
rxresp
expect resp.status == 200
expect resp.body == "Geoff Still Rules"
} -start
client c2 -wait
client c3 -wait
# Finally the request to "/2". The expect in the server block makes sure that
# there were no extra requests to "/" from varnish.
client c4 {
txreq -url "/2"
rxresp
expect resp.status == 200
expect resp.body == "x"
} -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