Commit cb13f327 authored by Poul-Henning Kamp's avatar Poul-Henning Kamp

Convert a lot of testcases which don't care how the response was

transferred to examine resp.bodylen instead of resp.http.content-length.

(This is in preparation for streaming being default)
parent 8d2ce2c2
......@@ -26,9 +26,9 @@ client c1 {
txreq -url "/bar"
rxresp
expect resp.status == 200
expect resp.http.content-length == "4"
expect resp.bodylen == "4"
txreq -url "/foo"
rxresp
expect resp.status == 200
expect resp.http.content-length == "8"
expect resp.bodylen == "8"
} -run
......@@ -16,5 +16,5 @@ client c1 {
txreq -url "/"
rxresp
expect resp.status == 200
expect resp.http.content-length == 36
expect resp.bodylen == 36
} -run
......@@ -15,15 +15,15 @@ client c1 {
send "GET /foo HTTP/1.1\n\nGET /bar HTTP/1.1\n\nGET /bar HTTP/1.1\n\n"
rxresp
expect resp.status == 200
expect resp.http.content-length == 3
expect resp.bodylen == 3
expect resp.http.x-varnish == "1001"
rxresp
expect resp.status == 200
expect resp.http.content-length == 6
expect resp.bodylen == 6
expect resp.http.x-varnish == "1002"
rxresp
expect resp.status == 200
expect resp.http.content-length == 6
expect resp.bodylen == 6
expect resp.http.x-varnish == "1003 1002"
} -run
......
......@@ -15,17 +15,17 @@ client c1 {
send "GET /foo HTTP/1.1\r\n\r\nGET "
rxresp
expect resp.status == 200
expect resp.http.content-length == 3
expect resp.bodylen == 3
expect resp.http.x-varnish == "1001"
send "/bar HTTP/1.1\n\nGET /bar "
rxresp
expect resp.status == 200
expect resp.http.content-length == 6
expect resp.bodylen == 6
expect resp.http.x-varnish == "1002"
send "HTTP/1.1\n\n"
rxresp
expect resp.status == 200
expect resp.http.content-length == 6
expect resp.bodylen == 6
expect resp.http.x-varnish == "1003 1002"
} -run
......
......@@ -15,7 +15,7 @@ client c1 {
txreq -url "/foo"
rxresp
expect resp.status == 200
expect resp.http.content-length == 5
expect resp.bodylen == 5
}
client c1 -run
......@@ -26,7 +26,7 @@ client c1 {
txreq -url "/foo"
rxresp
expect resp.status == 200
expect resp.http.content-length == 6
expect resp.bodylen == 6
}
client c1 -run
......@@ -15,7 +15,7 @@ client c1 {
rxresp
expect resp.status == 200
expect resp.http.etag == "foo"
expect resp.http.content-length == 6
expect resp.bodylen == 6
txreq -url "/foo" \
-hdr "If-Modified-Since: Thu, 26 Jun 2008 12:00:00 GMT"
......
......@@ -32,7 +32,7 @@ client c1 {
txreq -url "/foo"
rxresp
expect resp.status == 200
expect resp.http.content-length == 6
expect resp.bodylen == 6
}
client c1 -run
......@@ -19,12 +19,12 @@ client c1 {
txreq -url "/foo"
rxresp
expect resp.status == 200
expect resp.http.content-length == 6
expect resp.bodylen == 6
expect resp.http.x-varnish == "1001"
txreq -url "/foo"
rxresp
expect resp.status == 200
expect resp.http.content-length == 7
expect resp.bodylen == 7
expect resp.http.x-varnish == "1002"
}
......
......@@ -19,12 +19,12 @@ client c1 {
txreq -url "/foo"
rxresp
expect resp.status == 200
expect resp.http.content-length == 6
expect resp.bodylen == 6
expect resp.http.x-varnish == "1001"
txreq -url "/foo"
rxresp
expect resp.status == 200
expect resp.http.content-length == 7
expect resp.bodylen == 7
expect resp.http.x-varnish == "1002"
}
......
......@@ -19,12 +19,12 @@ client c1 {
txreq -url "/foo"
rxresp
expect resp.status == 200
expect resp.http.content-length == 6
expect resp.bodylen == 6
expect resp.http.x-varnish == "1001"
txreq -url "/foo"
rxresp
expect resp.status == 200
expect resp.http.content-length == 7
expect resp.bodylen == 7
expect resp.http.x-varnish == "1002"
}
......
......@@ -16,7 +16,7 @@ client c1 {
txreq -url "/foo" -hdr "client: c1"
rxresp
expect resp.status == 200
expect resp.http.content-length == 12
expect resp.bodylen == 12
expect resp.http.x-varnish == "1001"
} -start
......@@ -26,7 +26,7 @@ client c2 {
sema r1 sync 2
rxresp
expect resp.status == 200
expect resp.http.content-length == 12
expect resp.bodylen == 12
expect resp.http.x-varnish == "1002 1001"
} -run
......
......@@ -23,7 +23,7 @@ client c1 {
txreq -url "/foo"
rxresp
expect resp.status == 200
expect resp.http.content-length == 12
expect resp.bodylen == 12
expect resp.http.x-varnish == "1001"
} -start
sema r1 sync 2
......@@ -31,7 +31,7 @@ client c2 {
txreq -url "/foo"
rxresp
expect resp.status == 200
expect resp.http.content-length == 6
expect resp.bodylen == 6
expect resp.http.x-varnish == "1002"
} -run
......
......@@ -25,7 +25,7 @@ client c1 {
txreq -url "/foo"
rxresp
expect resp.status == 200
expect resp.http.content-length == 6
expect resp.bodylen == 6
expect resp.http.x-varnish == "1001"
} -run
......@@ -35,7 +35,7 @@ client c2 {
txreq -url "/foo"
rxresp
expect resp.status == 200
expect resp.http.content-length == 7
expect resp.bodylen == 7
expect resp.http.x-varnish == "1002"
} -run
......@@ -45,7 +45,7 @@ client c3 {
txreq -url "/foo"
rxresp
expect resp.status == 200
expect resp.http.content-length == 6
expect resp.bodylen == 6
expect resp.http.x-varnish == "1003 1001"
} -run
......
......@@ -13,7 +13,7 @@ client c1 {
txreq -url "/foo"
rxresp
expect resp.status == 200
expect resp.http.content-length == 6
expect resp.bodylen == 6
txreq -url "/foo" \
-hdr "If-None-Match: 12345678"
......
......@@ -14,7 +14,7 @@ client c1 {
txreq -url "/foo"
rxresp
expect resp.status == 200
expect resp.http.content-length == 6
expect resp.bodylen == 6
txreq -url "/foo" \
-hdr "If-None-Match: 123456789"
......
......@@ -18,7 +18,7 @@ client c1 {
txreq
rxresp
expect resp.status == 200
expect resp.http.content-length == 33
expect resp.bodylen == 33
}
client c1 -run
......
......@@ -28,7 +28,6 @@ client c1 {
rxresp
expect resp.status == 200
expect resp.bodylen == 57
expect resp.http.content-length == 57
} -run
varnish v1 -cli "param.set esi_syntax 1"
......
......@@ -21,7 +21,7 @@ client c1 {
txreq -url "/bar"
rxresp
expect resp.status == 200
expect resp.http.content-length == "4"
expect resp.bodylen == "4"
expect resp.http.foo == "BAR"
expect resp.http.bar == "foo"
} -run
......
......@@ -21,7 +21,7 @@ client c1 {
txreq -url "/bar"
rxresp
expect resp.status == 200
expect resp.http.content-length == "4"
expect resp.bodylen == "4"
expect resp.http.foo == "BAR"
expect resp.http.bar == "foo"
} -run
......@@ -33,7 +33,7 @@ client c1 {
txreq -url "/bar"
rxresp
expect resp.status == 200
expect resp.http.content-length == "4"
expect resp.bodylen == "4"
expect resp.http.foo == "bAr"
expect resp.http.bar == "fOo"
} -run
......
......@@ -21,7 +21,7 @@ client c1 {
txreq -url "/bar"
rxresp
expect resp.status == 200
expect resp.http.content-length == "4"
expect resp.bodylen == "4"
expect resp.http.foo == "BAR"
expect resp.http.bar == "foo"
} -run
......
......@@ -34,21 +34,21 @@ client c1 {
txreq -url "/one"
rxresp
expect resp.status == 200
expect resp.http.content-length == "4"
expect resp.bodylen == "4"
expect resp.http.foo == "bar"
expect resp.http.one == "File One"
txreq -url "/two"
rxresp
expect resp.status == 200
expect resp.http.content-length == "4"
expect resp.bodylen == "4"
expect resp.http.foo == "bar"
expect resp.http.two == "File Two"
txreq -url "/three"
rxresp
expect resp.status == 200
expect resp.http.content-length == "4"
expect resp.bodylen == "4"
expect resp.http.foo == "bar"
expect resp.http.three == "File Three"
} -run
......
......@@ -15,6 +15,5 @@ varnish v1 -arg "-p vcc_err_unref=false" -vcl+backend {
client c1 {
txreq -url /bar
rxresp
expect resp.http.content-length == 6
expect resp.bodylen == 6
} -run
......@@ -17,6 +17,6 @@ varnish v1 -vcl+backend {
client c1 {
txreq -url /bar
rxresp
expect resp.http.content-length == 6
expect resp.bodylen == 6
expect resp.http.foo == "XXX"
} -run
......@@ -11,7 +11,7 @@ varnish v1 -vcl+backend { } -start
client c1 {
txreq -url /bar
rxresp
expect resp.http.content-length == 6
expect resp.bodylen == 6
} -run
varnish v1 -cliok {ban req.url ~ << foo
......
......@@ -15,7 +15,7 @@ varnish v1 -vcl+backend { } -start
client c1 {
txreq -url "/"
rxresp
expect resp.http.content-length == 5
expect resp.bodylen == 5
expect resp.http.x-varnish == "1001"
expect resp.status == 200
} -run
......@@ -27,5 +27,5 @@ client c2 {
rxresp
expect resp.status == 200
expect resp.http.x-varnish == "1002"
expect resp.http.content-length == 6
expect resp.bodylen == 6
} -run
......@@ -15,7 +15,7 @@ varnish v1 -vcl+backend { } -start
client c1 {
txreq -url "/"
rxresp
expect resp.http.content-length == 5
expect resp.bodylen == 5
expect resp.http.x-varnish == "1001"
expect resp.status == 200
} -run
......@@ -28,5 +28,5 @@ client c2 {
rxresp
expect resp.status == 200
expect resp.http.x-varnish == "1002"
expect resp.http.content-length == 6
expect resp.bodylen == 6
} -run
......@@ -39,16 +39,16 @@ client c1 {
timeout 3
txreq -url "/foo1"
rxresp
expect resp.http.content-length == 1
expect resp.bodylen == 1
txreq -url "/foo2"
rxresp
expect resp.http.content-length == 2
expect resp.bodylen == 2
txreq -url "/foo3"
rxresp
expect resp.http.content-length == 3
expect resp.bodylen == 3
txreq -url "/foo4"
rxresp
expect resp.http.content-length == 4
expect resp.bodylen == 4
} -run
server s1 -start
......@@ -58,8 +58,8 @@ client c2 {
timeout 3
txreq -url "/foo11"
rxresp
expect resp.http.content-length == 1
expect resp.bodylen == 1
txreq -url "/foo22"
rxresp
expect resp.http.content-length == 2
expect resp.bodylen == 2
} -run
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment