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 { ...@@ -26,9 +26,9 @@ client c1 {
txreq -url "/bar" txreq -url "/bar"
rxresp rxresp
expect resp.status == 200 expect resp.status == 200
expect resp.http.content-length == "4" expect resp.bodylen == "4"
txreq -url "/foo" txreq -url "/foo"
rxresp rxresp
expect resp.status == 200 expect resp.status == 200
expect resp.http.content-length == "8" expect resp.bodylen == "8"
} -run } -run
...@@ -16,5 +16,5 @@ client c1 { ...@@ -16,5 +16,5 @@ client c1 {
txreq -url "/" txreq -url "/"
rxresp rxresp
expect resp.status == 200 expect resp.status == 200
expect resp.http.content-length == 36 expect resp.bodylen == 36
} -run } -run
...@@ -15,15 +15,15 @@ client c1 { ...@@ -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" send "GET /foo HTTP/1.1\n\nGET /bar HTTP/1.1\n\nGET /bar HTTP/1.1\n\n"
rxresp rxresp
expect resp.status == 200 expect resp.status == 200
expect resp.http.content-length == 3 expect resp.bodylen == 3
expect resp.http.x-varnish == "1001" expect resp.http.x-varnish == "1001"
rxresp rxresp
expect resp.status == 200 expect resp.status == 200
expect resp.http.content-length == 6 expect resp.bodylen == 6
expect resp.http.x-varnish == "1002" expect resp.http.x-varnish == "1002"
rxresp rxresp
expect resp.status == 200 expect resp.status == 200
expect resp.http.content-length == 6 expect resp.bodylen == 6
expect resp.http.x-varnish == "1003 1002" expect resp.http.x-varnish == "1003 1002"
} -run } -run
......
...@@ -15,17 +15,17 @@ client c1 { ...@@ -15,17 +15,17 @@ client c1 {
send "GET /foo HTTP/1.1\r\n\r\nGET " send "GET /foo HTTP/1.1\r\n\r\nGET "
rxresp rxresp
expect resp.status == 200 expect resp.status == 200
expect resp.http.content-length == 3 expect resp.bodylen == 3
expect resp.http.x-varnish == "1001" expect resp.http.x-varnish == "1001"
send "/bar HTTP/1.1\n\nGET /bar " send "/bar HTTP/1.1\n\nGET /bar "
rxresp rxresp
expect resp.status == 200 expect resp.status == 200
expect resp.http.content-length == 6 expect resp.bodylen == 6
expect resp.http.x-varnish == "1002" expect resp.http.x-varnish == "1002"
send "HTTP/1.1\n\n" send "HTTP/1.1\n\n"
rxresp rxresp
expect resp.status == 200 expect resp.status == 200
expect resp.http.content-length == 6 expect resp.bodylen == 6
expect resp.http.x-varnish == "1003 1002" expect resp.http.x-varnish == "1003 1002"
} -run } -run
......
...@@ -15,7 +15,7 @@ client c1 { ...@@ -15,7 +15,7 @@ client c1 {
txreq -url "/foo" txreq -url "/foo"
rxresp rxresp
expect resp.status == 200 expect resp.status == 200
expect resp.http.content-length == 5 expect resp.bodylen == 5
} }
client c1 -run client c1 -run
...@@ -26,7 +26,7 @@ client c1 { ...@@ -26,7 +26,7 @@ client c1 {
txreq -url "/foo" txreq -url "/foo"
rxresp rxresp
expect resp.status == 200 expect resp.status == 200
expect resp.http.content-length == 6 expect resp.bodylen == 6
} }
client c1 -run client c1 -run
...@@ -15,7 +15,7 @@ client c1 { ...@@ -15,7 +15,7 @@ client c1 {
rxresp rxresp
expect resp.status == 200 expect resp.status == 200
expect resp.http.etag == "foo" expect resp.http.etag == "foo"
expect resp.http.content-length == 6 expect resp.bodylen == 6
txreq -url "/foo" \ txreq -url "/foo" \
-hdr "If-Modified-Since: Thu, 26 Jun 2008 12:00:00 GMT" -hdr "If-Modified-Since: Thu, 26 Jun 2008 12:00:00 GMT"
......
...@@ -32,7 +32,7 @@ client c1 { ...@@ -32,7 +32,7 @@ client c1 {
txreq -url "/foo" txreq -url "/foo"
rxresp rxresp
expect resp.status == 200 expect resp.status == 200
expect resp.http.content-length == 6 expect resp.bodylen == 6
} }
client c1 -run client c1 -run
...@@ -19,12 +19,12 @@ client c1 { ...@@ -19,12 +19,12 @@ client c1 {
txreq -url "/foo" txreq -url "/foo"
rxresp rxresp
expect resp.status == 200 expect resp.status == 200
expect resp.http.content-length == 6 expect resp.bodylen == 6
expect resp.http.x-varnish == "1001" expect resp.http.x-varnish == "1001"
txreq -url "/foo" txreq -url "/foo"
rxresp rxresp
expect resp.status == 200 expect resp.status == 200
expect resp.http.content-length == 7 expect resp.bodylen == 7
expect resp.http.x-varnish == "1002" expect resp.http.x-varnish == "1002"
} }
......
...@@ -19,12 +19,12 @@ client c1 { ...@@ -19,12 +19,12 @@ client c1 {
txreq -url "/foo" txreq -url "/foo"
rxresp rxresp
expect resp.status == 200 expect resp.status == 200
expect resp.http.content-length == 6 expect resp.bodylen == 6
expect resp.http.x-varnish == "1001" expect resp.http.x-varnish == "1001"
txreq -url "/foo" txreq -url "/foo"
rxresp rxresp
expect resp.status == 200 expect resp.status == 200
expect resp.http.content-length == 7 expect resp.bodylen == 7
expect resp.http.x-varnish == "1002" expect resp.http.x-varnish == "1002"
} }
......
...@@ -19,12 +19,12 @@ client c1 { ...@@ -19,12 +19,12 @@ client c1 {
txreq -url "/foo" txreq -url "/foo"
rxresp rxresp
expect resp.status == 200 expect resp.status == 200
expect resp.http.content-length == 6 expect resp.bodylen == 6
expect resp.http.x-varnish == "1001" expect resp.http.x-varnish == "1001"
txreq -url "/foo" txreq -url "/foo"
rxresp rxresp
expect resp.status == 200 expect resp.status == 200
expect resp.http.content-length == 7 expect resp.bodylen == 7
expect resp.http.x-varnish == "1002" expect resp.http.x-varnish == "1002"
} }
......
...@@ -16,7 +16,7 @@ client c1 { ...@@ -16,7 +16,7 @@ client c1 {
txreq -url "/foo" -hdr "client: c1" txreq -url "/foo" -hdr "client: c1"
rxresp rxresp
expect resp.status == 200 expect resp.status == 200
expect resp.http.content-length == 12 expect resp.bodylen == 12
expect resp.http.x-varnish == "1001" expect resp.http.x-varnish == "1001"
} -start } -start
...@@ -26,7 +26,7 @@ client c2 { ...@@ -26,7 +26,7 @@ client c2 {
sema r1 sync 2 sema r1 sync 2
rxresp rxresp
expect resp.status == 200 expect resp.status == 200
expect resp.http.content-length == 12 expect resp.bodylen == 12
expect resp.http.x-varnish == "1002 1001" expect resp.http.x-varnish == "1002 1001"
} -run } -run
......
...@@ -23,7 +23,7 @@ client c1 { ...@@ -23,7 +23,7 @@ client c1 {
txreq -url "/foo" txreq -url "/foo"
rxresp rxresp
expect resp.status == 200 expect resp.status == 200
expect resp.http.content-length == 12 expect resp.bodylen == 12
expect resp.http.x-varnish == "1001" expect resp.http.x-varnish == "1001"
} -start } -start
sema r1 sync 2 sema r1 sync 2
...@@ -31,7 +31,7 @@ client c2 { ...@@ -31,7 +31,7 @@ client c2 {
txreq -url "/foo" txreq -url "/foo"
rxresp rxresp
expect resp.status == 200 expect resp.status == 200
expect resp.http.content-length == 6 expect resp.bodylen == 6
expect resp.http.x-varnish == "1002" expect resp.http.x-varnish == "1002"
} -run } -run
......
...@@ -25,7 +25,7 @@ client c1 { ...@@ -25,7 +25,7 @@ client c1 {
txreq -url "/foo" txreq -url "/foo"
rxresp rxresp
expect resp.status == 200 expect resp.status == 200
expect resp.http.content-length == 6 expect resp.bodylen == 6
expect resp.http.x-varnish == "1001" expect resp.http.x-varnish == "1001"
} -run } -run
...@@ -35,7 +35,7 @@ client c2 { ...@@ -35,7 +35,7 @@ client c2 {
txreq -url "/foo" txreq -url "/foo"
rxresp rxresp
expect resp.status == 200 expect resp.status == 200
expect resp.http.content-length == 7 expect resp.bodylen == 7
expect resp.http.x-varnish == "1002" expect resp.http.x-varnish == "1002"
} -run } -run
...@@ -45,7 +45,7 @@ client c3 { ...@@ -45,7 +45,7 @@ client c3 {
txreq -url "/foo" txreq -url "/foo"
rxresp rxresp
expect resp.status == 200 expect resp.status == 200
expect resp.http.content-length == 6 expect resp.bodylen == 6
expect resp.http.x-varnish == "1003 1001" expect resp.http.x-varnish == "1003 1001"
} -run } -run
......
...@@ -13,7 +13,7 @@ client c1 { ...@@ -13,7 +13,7 @@ client c1 {
txreq -url "/foo" txreq -url "/foo"
rxresp rxresp
expect resp.status == 200 expect resp.status == 200
expect resp.http.content-length == 6 expect resp.bodylen == 6
txreq -url "/foo" \ txreq -url "/foo" \
-hdr "If-None-Match: 12345678" -hdr "If-None-Match: 12345678"
......
...@@ -14,7 +14,7 @@ client c1 { ...@@ -14,7 +14,7 @@ client c1 {
txreq -url "/foo" txreq -url "/foo"
rxresp rxresp
expect resp.status == 200 expect resp.status == 200
expect resp.http.content-length == 6 expect resp.bodylen == 6
txreq -url "/foo" \ txreq -url "/foo" \
-hdr "If-None-Match: 123456789" -hdr "If-None-Match: 123456789"
......
...@@ -18,7 +18,7 @@ client c1 { ...@@ -18,7 +18,7 @@ client c1 {
txreq txreq
rxresp rxresp
expect resp.status == 200 expect resp.status == 200
expect resp.http.content-length == 33 expect resp.bodylen == 33
} }
client c1 -run client c1 -run
......
...@@ -28,7 +28,6 @@ client c1 { ...@@ -28,7 +28,6 @@ client c1 {
rxresp rxresp
expect resp.status == 200 expect resp.status == 200
expect resp.bodylen == 57 expect resp.bodylen == 57
expect resp.http.content-length == 57
} -run } -run
varnish v1 -cli "param.set esi_syntax 1" varnish v1 -cli "param.set esi_syntax 1"
......
...@@ -21,7 +21,7 @@ client c1 { ...@@ -21,7 +21,7 @@ client c1 {
txreq -url "/bar" txreq -url "/bar"
rxresp rxresp
expect resp.status == 200 expect resp.status == 200
expect resp.http.content-length == "4" expect resp.bodylen == "4"
expect resp.http.foo == "BAR" expect resp.http.foo == "BAR"
expect resp.http.bar == "foo" expect resp.http.bar == "foo"
} -run } -run
......
...@@ -21,7 +21,7 @@ client c1 { ...@@ -21,7 +21,7 @@ client c1 {
txreq -url "/bar" txreq -url "/bar"
rxresp rxresp
expect resp.status == 200 expect resp.status == 200
expect resp.http.content-length == "4" expect resp.bodylen == "4"
expect resp.http.foo == "BAR" expect resp.http.foo == "BAR"
expect resp.http.bar == "foo" expect resp.http.bar == "foo"
} -run } -run
...@@ -33,7 +33,7 @@ client c1 { ...@@ -33,7 +33,7 @@ client c1 {
txreq -url "/bar" txreq -url "/bar"
rxresp rxresp
expect resp.status == 200 expect resp.status == 200
expect resp.http.content-length == "4" expect resp.bodylen == "4"
expect resp.http.foo == "bAr" expect resp.http.foo == "bAr"
expect resp.http.bar == "fOo" expect resp.http.bar == "fOo"
} -run } -run
......
...@@ -21,7 +21,7 @@ client c1 { ...@@ -21,7 +21,7 @@ client c1 {
txreq -url "/bar" txreq -url "/bar"
rxresp rxresp
expect resp.status == 200 expect resp.status == 200
expect resp.http.content-length == "4" expect resp.bodylen == "4"
expect resp.http.foo == "BAR" expect resp.http.foo == "BAR"
expect resp.http.bar == "foo" expect resp.http.bar == "foo"
} -run } -run
......
...@@ -34,21 +34,21 @@ client c1 { ...@@ -34,21 +34,21 @@ client c1 {
txreq -url "/one" txreq -url "/one"
rxresp rxresp
expect resp.status == 200 expect resp.status == 200
expect resp.http.content-length == "4" expect resp.bodylen == "4"
expect resp.http.foo == "bar" expect resp.http.foo == "bar"
expect resp.http.one == "File One" expect resp.http.one == "File One"
txreq -url "/two" txreq -url "/two"
rxresp rxresp
expect resp.status == 200 expect resp.status == 200
expect resp.http.content-length == "4" expect resp.bodylen == "4"
expect resp.http.foo == "bar" expect resp.http.foo == "bar"
expect resp.http.two == "File Two" expect resp.http.two == "File Two"
txreq -url "/three" txreq -url "/three"
rxresp rxresp
expect resp.status == 200 expect resp.status == 200
expect resp.http.content-length == "4" expect resp.bodylen == "4"
expect resp.http.foo == "bar" expect resp.http.foo == "bar"
expect resp.http.three == "File Three" expect resp.http.three == "File Three"
} -run } -run
......
...@@ -15,6 +15,5 @@ varnish v1 -arg "-p vcc_err_unref=false" -vcl+backend { ...@@ -15,6 +15,5 @@ varnish v1 -arg "-p vcc_err_unref=false" -vcl+backend {
client c1 { client c1 {
txreq -url /bar txreq -url /bar
rxresp rxresp
expect resp.http.content-length == 6
expect resp.bodylen == 6 expect resp.bodylen == 6
} -run } -run
...@@ -17,6 +17,6 @@ varnish v1 -vcl+backend { ...@@ -17,6 +17,6 @@ varnish v1 -vcl+backend {
client c1 { client c1 {
txreq -url /bar txreq -url /bar
rxresp rxresp
expect resp.http.content-length == 6 expect resp.bodylen == 6
expect resp.http.foo == "XXX" expect resp.http.foo == "XXX"
} -run } -run
...@@ -11,7 +11,7 @@ varnish v1 -vcl+backend { } -start ...@@ -11,7 +11,7 @@ varnish v1 -vcl+backend { } -start
client c1 { client c1 {
txreq -url /bar txreq -url /bar
rxresp rxresp
expect resp.http.content-length == 6 expect resp.bodylen == 6
} -run } -run
varnish v1 -cliok {ban req.url ~ << foo varnish v1 -cliok {ban req.url ~ << foo
......
...@@ -15,7 +15,7 @@ varnish v1 -vcl+backend { } -start ...@@ -15,7 +15,7 @@ varnish v1 -vcl+backend { } -start
client c1 { client c1 {
txreq -url "/" txreq -url "/"
rxresp rxresp
expect resp.http.content-length == 5 expect resp.bodylen == 5
expect resp.http.x-varnish == "1001" expect resp.http.x-varnish == "1001"
expect resp.status == 200 expect resp.status == 200
} -run } -run
...@@ -27,5 +27,5 @@ client c2 { ...@@ -27,5 +27,5 @@ client c2 {
rxresp rxresp
expect resp.status == 200 expect resp.status == 200
expect resp.http.x-varnish == "1002" expect resp.http.x-varnish == "1002"
expect resp.http.content-length == 6 expect resp.bodylen == 6
} -run } -run
...@@ -15,7 +15,7 @@ varnish v1 -vcl+backend { } -start ...@@ -15,7 +15,7 @@ varnish v1 -vcl+backend { } -start
client c1 { client c1 {
txreq -url "/" txreq -url "/"
rxresp rxresp
expect resp.http.content-length == 5 expect resp.bodylen == 5
expect resp.http.x-varnish == "1001" expect resp.http.x-varnish == "1001"
expect resp.status == 200 expect resp.status == 200
} -run } -run
...@@ -28,5 +28,5 @@ client c2 { ...@@ -28,5 +28,5 @@ client c2 {
rxresp rxresp
expect resp.status == 200 expect resp.status == 200
expect resp.http.x-varnish == "1002" expect resp.http.x-varnish == "1002"
expect resp.http.content-length == 6 expect resp.bodylen == 6
} -run } -run
...@@ -39,16 +39,16 @@ client c1 { ...@@ -39,16 +39,16 @@ client c1 {
timeout 3 timeout 3
txreq -url "/foo1" txreq -url "/foo1"
rxresp rxresp
expect resp.http.content-length == 1 expect resp.bodylen == 1
txreq -url "/foo2" txreq -url "/foo2"
rxresp rxresp
expect resp.http.content-length == 2 expect resp.bodylen == 2
txreq -url "/foo3" txreq -url "/foo3"
rxresp rxresp
expect resp.http.content-length == 3 expect resp.bodylen == 3
txreq -url "/foo4" txreq -url "/foo4"
rxresp rxresp
expect resp.http.content-length == 4 expect resp.bodylen == 4
} -run } -run
server s1 -start server s1 -start
...@@ -58,8 +58,8 @@ client c2 { ...@@ -58,8 +58,8 @@ client c2 {
timeout 3 timeout 3
txreq -url "/foo11" txreq -url "/foo11"
rxresp rxresp
expect resp.http.content-length == 1 expect resp.bodylen == 1
txreq -url "/foo22" txreq -url "/foo22"
rxresp rxresp
expect resp.http.content-length == 2 expect resp.bodylen == 2
} -run } -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