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
70878b17
Commit
70878b17
authored
Jul 18, 2018
by
Geoff Simmons
Committed by
Dridi Boukelmoune
Aug 16, 2018
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add an out-of-workspace test for VMOD blob's sub() function.
parent
7b3a3a98
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
23 additions
and
0 deletions
+23
-0
m00049.vtc
bin/varnishtest/tests/m00049.vtc
+23
-0
No files found.
bin/varnishtest/tests/m00049.vtc
View file @
70878b17
...
...
@@ -161,3 +161,26 @@ varnish v1 -vcl {
client c1 -run
client c2 -run
client c3 -run
# sub() function
varnish v1 -vcl {
import blob;
import vtc;
backend b { .host = "${bad_ip}"; }
sub vcl_miss {
if (req.url == "/1") {
# Not enough for req.hash + vmod_priv
vtc.workspace_alloc(client, -65);
}
elsif (req.url == "/2") {
# Not enough for req.hash + vmod_priv + 30 bytes
vtc.workspace_alloc(client, -90);
}
set req.http.Encode = blob.encode(blob=blob.sub(req.hash, 30B));
return( synth(200) );
}
}
client c1 -run
client c2 -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