Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
V
varnish-objvar
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Jobs
Commits
Open sidebar
uplex-varnish
varnish-objvar
Commits
91ed36f8
Unverified
Commit
91ed36f8
authored
Feb 22, 2021
by
Nils Goroll
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Lost test case from previous
parent
4b18cd06
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
52 additions
and
0 deletions
+52
-0
.gitignore
.gitignore
+1
-0
vmod_taskvar_foreach.vtc
src/vtc/vmod_taskvar_foreach.vtc
+51
-0
No files found.
.gitignore
View file @
91ed36f8
...
@@ -28,6 +28,7 @@ stamp-h1
...
@@ -28,6 +28,7 @@ stamp-h1
*.log
*.log
*.trs
*.trs
*.vtc
*.vtc
!src/vtc/vmod_taskvar_foreach.vtc
# vmodtool
# vmodtool
...
...
src/vtc/vmod_taskvar_foreach.vtc
0 → 100644
View file @
91ed36f8
varnishtest "test vmod-taskvar string foreach"
varnish v1 -vcl {
import taskvar;
import std;
backend proforma None;
sub vcl_init {
new str = taskvar.string();
}
sub iter {
std.log(str.get());
if (req.url == "/return") {
return (synth(404));
}
}
sub vcl_recv {
str.foreach(req.http.foo, iter);
return (synth(200));
}
} -start
logexpect l1 -v v1 -q "vxid == 1001" {
expect * 1001 VCL_call ^RECV
expect 0 = VCL_Log ^1$
expect 0 = VCL_Log ^2$
expect 0 = VCL_Log ^3$
expect 0 = VCL_Log ^4$
expect 0 = VCL_return ^synth
} -start
logexpect l2 -v v1 -q "vxid == 1002" {
expect * 1002 VCL_call ^RECV
expect 0 = VCL_Log ^1$
expect 0 = VCL_return ^synth
} -start
client c1 {
txreq -hdr "foo: 1,2,,3,,,4"
rxresp
expect resp.status == 200
txreq -url "/return" -hdr "foo: 1,2,,3,,,4"
rxresp
expect resp.status == 404
} -run
logexpect l1 -wait
\ No newline at end of file
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