Skip to content
This repository has been archived by the owner on Oct 24, 2020. It is now read-only.

Commit

Permalink
Amend test case with a case for string with '-' in it. See issue #5
Browse files Browse the repository at this point in the history
  • Loading branch information
daghf committed Feb 11, 2014
1 parent d6a5508 commit 6f33f36
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions src/tests/get.vtc
Expand Up @@ -10,6 +10,10 @@ server s1 {
rxreq
expect req.url == "/two"
txresp -status 200 -hdr "foo: sillycookie=blah" -hdr "foo: realcookie=YAI"

rxreq
expect req.url == "/three"
txresp -status 200
} -start

varnish v1 -vcl+backend {
Expand All @@ -20,6 +24,8 @@ varnish v1 -vcl+backend {
set beresp.http.xusr = header.get(beresp.http.foo,"realcookie=");
} elsif (req.url == "/two") {
set beresp.http.xusr = header.get(beresp.http.foo,"^realcookie=");
} elsif (req.url == "/three") {
set beresp.http.xusr = header.get(req.http.Cookie, "foo-bar=");
}
return(deliver);
}
Expand All @@ -35,6 +41,11 @@ client c1 {
rxresp
expect resp.status == 200
expect resp.http.xusr == "realcookie=YAI"

txreq -url "/three" -hdr "Cookie: foo-bar=derp"
rxresp
expect resp.status == 200
expect resp.http.xusr == "foo-bar=derp"
} -run


0 comments on commit 6f33f36

Please sign in to comment.