Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
V
varnishevent3
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
varnishevent3
Commits
33d0e410
Commit
33d0e410
authored
Nov 28, 2011
by
Poul-Henning Kamp
Committed by
Tollef Fog Heen
Mar 08, 2012
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Make it possible to test for the non-definition of a http header.
Fixes #1062
parent
fe1ae1b5
Changes
14
Hide whitespace changes
Inline
Side-by-side
Showing
14 changed files
with
41 additions
and
28 deletions
+41
-28
a00012.vtc
bin/varnishtest/tests/a00012.vtc
+13
-0
c00016.vtc
bin/varnishtest/tests/c00016.vtc
+2
-2
e00024.vtc
bin/varnishtest/tests/e00024.vtc
+1
-1
e00025.vtc
bin/varnishtest/tests/e00025.vtc
+1
-1
g00001.vtc
bin/varnishtest/tests/g00001.vtc
+3
-3
g00002.vtc
bin/varnishtest/tests/g00002.vtc
+2
-2
g00003.vtc
bin/varnishtest/tests/g00003.vtc
+3
-3
r00292.vtc
bin/varnishtest/tests/r00292.vtc
+3
-3
r00466.vtc
bin/varnishtest/tests/r00466.vtc
+1
-1
r00494.vtc
bin/varnishtest/tests/r00494.vtc
+2
-2
r00693.vtc
bin/varnishtest/tests/r00693.vtc
+3
-3
r00861.vtc
bin/varnishtest/tests/r00861.vtc
+2
-2
r00980.vtc
bin/varnishtest/tests/r00980.vtc
+1
-1
vtc_http.c
bin/varnishtest/vtc_http.c
+4
-4
No files found.
bin/varnishtest/tests/a00012.vtc
0 → 100644
View file @
33d0e410
varnishtest "Ensure that we can test non-existence of headers (#1062)"
server s1 {
rxreq
txresp
} -start
client c1 -connect ${s1_sock} {
txreq
rxresp
expect resp.http.X-Test == <undef>
} -run
bin/varnishtest/tests/c00016.vtc
View file @
33d0e410
...
...
@@ -8,7 +8,7 @@ server s1 {
rxreq
expect req.url == "/bar"
expect req.http.Foo ==
"req.http.Foo"
expect req.http.Foo ==
<undef>
txresp -hdr "Bar: fnry,glyf, FOO ,brok" -hdr "Connection: bar" -body "foobar"
} -start
...
...
@@ -21,5 +21,5 @@ client c1 {
txreq -url "/bar" -hdr "Foo: bar2" -hdr "Connection: foo, close"
rxresp
expect req.http.Bar ==
"req.http.Bar"
expect req.http.Bar ==
<undef>
} -run
bin/varnishtest/tests/e00024.vtc
View file @
33d0e410
...
...
@@ -81,7 +81,7 @@ client c1 {
txreq
rxresp
expect resp.http.content-encoding ==
resp.http.content-encoding
expect resp.http.content-encoding ==
<undef>
expect resp.status == 200
expect resp.bodylen == 252
} -run
...
...
bin/varnishtest/tests/e00025.vtc
View file @
33d0e410
...
...
@@ -18,7 +18,7 @@ client c1 {
txreq
rxresp
expect resp.http.content-encoding ==
resp.http.content-encoding
expect resp.http.content-encoding ==
<undef>
expect resp.status == 200
expect resp.bodylen == 3
} -run
bin/varnishtest/tests/g00001.vtc
View file @
33d0e410
...
...
@@ -13,7 +13,7 @@ client c1 {
txreq
rxresp
expect resp.bodylen == "3"
expect resp.http.content-encoding ==
"resp.http.content-encoding"
expect resp.http.content-encoding ==
<undef>
txreq -hdr "Accept-encoding: gzip;q=0.1"
rxresp
...
...
@@ -26,13 +26,13 @@ client c1 {
txreq -proto HTTP/1.0
rxresp
expect resp.bodylen == "3"
expect resp.http.content-encoding ==
"resp.http.content-encoding"
expect resp.http.content-encoding ==
<undef>
} -run
client c1 {
txreq -req HEAD
rxresp -no_obj
expect resp.http.content-encoding ==
"resp.http.content-encoding"
expect resp.http.content-encoding ==
<undef>
txreq -req HEAD -hdr "Accept-encoding: gzip;q=0.1"
rxresp -no_obj
...
...
bin/varnishtest/tests/g00002.vtc
View file @
33d0e410
...
...
@@ -39,12 +39,12 @@ client c1 {
# See varnish can gunzip it.
txreq -url /foo -hdr "Accept-Encoding: null"
rxresp
expect resp.http.content-encoding ==
"resp.http.content-encoding"
expect resp.http.content-encoding ==
<undef>
expect resp.bodylen == 4100
# See varnish can gunzip it, inside ESI
txreq -url /bar -hdr "Accept-Encoding: null"
rxresp
expect resp.http.content-encoding ==
"resp.http.content-encoding"
expect resp.http.content-encoding ==
<undef>
expect resp.bodylen == 4109
} -run
bin/varnishtest/tests/g00003.vtc
View file @
33d0e410
...
...
@@ -30,12 +30,12 @@ varnish v1 -cliok "param.set http_gzip_support true" -vcl+backend {
client c1 {
txreq -url /foo -hdr "Accept-Encoding: gzip"
rxresp
expect resp.http.content-encoding ==
"resp.http.content-encoding"
expect resp.http.content-encoding ==
<undef>
expect resp.bodylen == 41
txreq -url /bar -hdr "Accept-Encoding: gzip"
rxresp
expect resp.http.content-encoding ==
"resp.http.content-encoding"
expect resp.http.content-encoding ==
<undef>
expect resp.bodylen == 42
txreq -url /foobar -hdr "Accept-Encoding: gzip"
...
...
@@ -46,6 +46,6 @@ client c1 {
txreq -url /foobar
rxresp
expect resp.http.content-encoding ==
"resp.http.content-encoding"
expect resp.http.content-encoding ==
<undef>
expect resp.bodylen == 43
} -run
bin/varnishtest/tests/r00292.vtc
View file @
33d0e410
...
...
@@ -6,11 +6,11 @@ varnishtest "Header deletion test"
server s1 {
rxreq
expect req.url == "/foo"
expect req.http.hdr1 ==
"req.http.hdr1"
expect req.http.hdr1 ==
<undef>
expect req.http.hdr2 == "2"
expect req.http.hdr3 ==
"req.http.hdr3"
expect req.http.hdr3 ==
<undef>
expect req.http.hdr4 == "4"
expect req.http.hdr5 ==
"req.http.hdr5"
expect req.http.hdr5 ==
<undef>
expect req.http.hdr6 == "6"
txresp -body "foobar"
} -start
...
...
bin/varnishtest/tests/r00466.vtc
View file @
33d0e410
...
...
@@ -3,7 +3,7 @@ varnishtest "Check Range forwarding to backend"
server s1 {
rxreq
expect req.url == "/foo"
expect req.http.range ==
"req.http.range"
expect req.http.range ==
<undef>
txresp \
-hdr "Foobar: _barf_" \
-body "012345\n"
...
...
bin/varnishtest/tests/r00494.vtc
View file @
33d0e410
...
...
@@ -19,6 +19,6 @@ client c1 {
txreq
rxresp
expect resp.http.bar == "bar, barf: fail"
expect resp.http.barf ==
resp.http.barf
expect resp.http.foo ==
resp.http.foo
expect resp.http.barf ==
<undef>
expect resp.http.foo ==
<undef>
} -run
bin/varnishtest/tests/r00693.vtc
View file @
33d0e410
...
...
@@ -4,11 +4,11 @@ feature 64bit
server s1 {
rxreq
expect req.http.baz ==
"req.http.baz"
expect req.http.baz ==
<undef>
txresp -status 201
rxreq
expect req.http.baz ==
"req.http.baz"
expect req.http.baz ==
<undef>
txresp -status 202
rxreq
...
...
@@ -52,7 +52,7 @@ varnish v1 -arg "-p sess_workspace=1024" -vcl+backend {
"0123456789abcdef" + "0123456789abcdef" +
"0123456789abcdef" + "0123456789abcdef" +
"0123456789abcdef" +
"0123456
7
";
"0123456";
set req.http.baz = "BAZ";
return (pass);
}
...
...
bin/varnishtest/tests/r00861.vtc
View file @
33d0e410
...
...
@@ -34,12 +34,12 @@ varnish v1 \
client c1 {
txreq -url "/1"
rxresp
expect resp.http.Content-Encoding ==
resp.http.Content-Encoding
expect resp.http.Content-Encoding ==
<undef>
expect resp.bodylen == 22
txreq -url "/barf" -hdr "Accept-Encoding: gzip"
rxresp
expect resp.http.Content-Encoding ==
resp.http.Content-Encoding
expect resp.http.Content-Encoding ==
<undef>
expect resp.bodylen == 909
txreq -url "/2" -hdr "Accept-Encoding: gzip"
...
...
bin/varnishtest/tests/r00980.vtc
View file @
33d0e410
...
...
@@ -24,6 +24,6 @@ client c1 {
txreq -url /foobar
rxresp
expect resp.http.content-encoding ==
"resp.http.content-encoding"
expect resp.http.content-encoding ==
<undef>
expect resp.bodylen == 43
} -run
bin/varnishtest/vtc_http.c
View file @
33d0e410
...
...
@@ -175,7 +175,7 @@ http_find_header(char * const *hh, const char *hdr)
* Expect
*/
static
char
*
static
c
onst
c
har
*
cmd_var_resolve
(
struct
http
*
hp
,
char
*
spec
)
{
char
**
hh
,
*
hdr
;
...
...
@@ -207,16 +207,16 @@ cmd_var_resolve(struct http *hp, char *spec)
hdr
=
http_find_header
(
hh
,
hdr
);
if
(
hdr
!=
NULL
)
return
(
hdr
);
return
(
spec
);
return
(
"<undef>"
);
}
static
void
cmd_http_expect
(
CMD_ARGS
)
{
struct
http
*
hp
;
char
*
lhs
;
c
onst
c
har
*
lhs
;
char
*
cmp
;
char
*
rhs
;
c
onst
c
har
*
rhs
;
(
void
)
cmd
;
(
void
)
vl
;
...
...
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