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

Improve stability of these two testcases.

We have to restart the server instance when we have writes which
might fail.
parent 415c7d8e
varnishtest "#942 junk after gzip from backend"
server s1 -repeat 2 {
server s1 {
rxreq
txresp -nolen \
-hdr "Content-Encoding: gzip" \
......@@ -18,13 +18,9 @@ server s1 -repeat 2 {
sendhex "00000000"
sendhex "00000000"
send "\r\n"
chunked "FOOBAR"
non-fatal
chunkedlen 0
accept
fatal
} -start
varnish v1 \
......@@ -46,6 +42,31 @@ client c1 {
expect resp.status == 503
} -run
server s1 -wait {
fatal
rxreq
txresp -nolen \
-hdr "Content-Encoding: gzip" \
-hdr "Connection: close" \
-hdr "Transfer-Encoding: Chunked"
send "14\r\n"
# An empty gzip file:
sendhex "1f8b"
sendhex "08"
sendhex "00"
sendhex "00000000"
sendhex "00"
sendhex "03"
sendhex "0300"
sendhex "00000000"
sendhex "00000000"
send "\r\n"
chunked "FOOBAR"
non-fatal
chunkedlen 0
} -start
client c1 {
txreq -url /2 -hdr "Foo: foo"
rxresp
......
......@@ -22,11 +22,30 @@ server s1 {
delay .2
non-fatal
chunked "FOOBAR"
non-fatal
chunkedlen 0
} -start
varnish v1 -vcl+backend {
sub vcl_backend_response {
if (beresp.http.set-cookie == "BAR") {
set beresp.do_stream = false;
}
}
} -start
client c1 {
txreq -hdr "Cookie: FOO"
rxresphdrs
expect resp.status == 200
expect_close
} -run
delay .1
accept
server s1 -wait {
fatal
# This one will not be streamed
......@@ -50,31 +69,12 @@ server s1 {
delay .2
non-fatal
chunked "FOOBAR"
non-fatal
chunkedlen 0
accept
} -start
varnish v1 -vcl+backend {
sub vcl_backend_response {
if (beresp.http.set-cookie == "BAR") {
set beresp.do_stream = false;
}
}
} -start
client c1 {
txreq -hdr "Cookie: FOO"
rxresphdrs
expect resp.status == 200
expect_close
} -run
delay .1
client c1 {
txreq -hdr "Cookie: BAR"
rxresp
......
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