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
12610fd5
Commit
12610fd5
authored
Apr 16, 2018
by
Federico G. Schwindt
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
More coverage
parent
f8cdec1d
Changes
4
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
30 additions
and
15 deletions
+30
-15
m00014.vtc
bin/varnishtest/tests/m00014.vtc
+17
-7
m00018.vtc
bin/varnishtest/tests/m00018.vtc
+8
-8
m00020.vtc
bin/varnishtest/tests/m00020.vtc
+3
-0
m00026.vtc
bin/varnishtest/tests/m00026.vtc
+2
-0
No files found.
bin/varnishtest/tests/m00014.vtc
View file @
12610fd5
...
...
@@ -9,40 +9,50 @@ varnish v1 -vcl+backend {
import std;
sub vcl_deliver {
set resp.http.url = std.querysort(req.url);
set resp.http.url = std.querysort(req.
http.
url);
}
} -start
client c1 {
txreq -
url "
/foo/bar?t=0&b=0&p=0&c=5"
txreq -
hdr "url:
/foo/bar?t=0&b=0&p=0&c=5"
rxresp
expect resp.http.url == "/foo/bar?b=0&c=5&p=0&t=0"
delay .1
txreq -
url "
/foo/bar?coa=0&co=0"
txreq -
hdr "url:
/foo/bar?coa=0&co=0"
rxresp
expect resp.http.url == "/foo/bar?co=0&coa=0"
delay .1
txreq -
url "
/foo/bar?a=0&&&&&"
txreq -
hdr "url:
/foo/bar?a=0&&&&&"
rxresp
expect resp.http.url == "/foo/bar?a=0"
txreq -
url "
/foo/bar?&a=0&&&&&z&w&x&"
txreq -
hdr "url:
/foo/bar?&a=0&&&&&z&w&x&"
rxresp
expect resp.http.url == "/foo/bar?a=0&w&x&z"
delay .1
txreq -
url "
/foo/bar?&"
txreq -
hdr "url:
/foo/bar?&"
rxresp
expect resp.http.url == "/foo/bar?"
delay .1
txreq -url "/foo/bar"
txreq -hdr "url: /foo/bar?t=0"
rxresp
expect resp.http.url == "/foo/bar?t=0"
delay .1
txreq -hdr "url: /foo/bar"
rxresp
expect resp.http.url == "/foo/bar"
txreq
rxresp
expect resp.http.url == ""
} -run
bin/varnishtest/tests/m00018.vtc
View file @
12610fd5
varnishtest "Test std.substr"
server s1
-repeat 2
{
server s1 {
rxreq
txresp
} -start
...
...
@@ -9,16 +9,16 @@ varnish v1 -vcl+backend {
import std;
sub vcl_deliver {
set resp.http.sub = std.strstr(req.url, "b");
set resp.http.sub1 = std.strstr(req.http.one, "b");
set resp.http.sub2 = std.strstr(req.http.two, "b");
set resp.http.sub3 = std.strstr(req.http.unset, "b");
}
} -start
client c1 {
txreq -
url "/foobar
"
txreq -
hdr "one: foobar" -hdr "two: quux
"
rxresp
expect resp.http.sub == "bar"
txreq -url "/quux"
rxresp
expect resp.http.sub == ""
expect resp.http.sub1 == "bar"
expect resp.http.sub2 == ""
expect resp.http.sub3 == ""
} -run
bin/varnishtest/tests/m00020.vtc
View file @
12610fd5
...
...
@@ -127,4 +127,7 @@ client c1 {
expect resp.http.x-date != "Wed, 29 Feb 2012 00:00:00 GMT"
delay .1
txreq
rxresp
expect resp.http.x-date != <undef>
} -run
bin/varnishtest/tests/m00026.vtc
View file @
12610fd5
...
...
@@ -11,6 +11,7 @@ varnish v1 -vcl {
sub vcl_synth {
set resp.http.X-PATH = std.getenv("PATH");
set resp.http.X-unset = std.getenv(req.http.unset);
}
} -start
...
...
@@ -18,4 +19,5 @@ client c1 {
txreq
rxresp
expect resp.http.X-PATH ~ "^/"
expect resp.http.X-unset == ""
} -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