[master] d9fa76b Move this test into the pen.
Poul-Henning Kamp
phk at FreeBSD.org
Tue Jan 7 11:35:13 CET 2014
commit d9fa76bfe764e1014590544093382f036ad2a43d
Author: Poul-Henning Kamp <phk at FreeBSD.org>
Date: Tue Jan 7 10:34:43 2014 +0000
Move this test into the pen.
Spotted by: fgs
diff --git a/bin/varnishtest/r01086.vtc b/bin/varnishtest/r01086.vtc
deleted file mode 100644
index ba4ace5..0000000
--- a/bin/varnishtest/r01086.vtc
+++ /dev/null
@@ -1,76 +0,0 @@
-varnishtest "#1086 junk after gzip from backend and streaming enabled"
-
-server s1 {
- # This one will be streamed
- rxreq
- txresp -nolen \
- -hdr "Content-Encoding: gzip" \
- -hdr "Transfer-Encoding: Chunked" \
- -hdr "Set-Cookie: FOO"
- 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"
-
- chunkedlen 0
-
- accept
-
- # This one will not be streamed
- rxreq
- txresp -nolen \
- -hdr "Content-Encoding: gzip" \
- -hdr "Transfer-Encoding: Chunked" \
- -hdr "Set-Cookie: BAR"
- 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"
-
- 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"
- rxresp
- expect resp.status == 200
- expect resp.bodylen == 0
-} -run
-
-delay .1
-
-client c1 {
- txreq -hdr "Cookie: BAR"
- rxresp
- expect resp.status == 503
-} -run
-
diff --git a/bin/varnishtest/tests/r01086.vtc b/bin/varnishtest/tests/r01086.vtc
new file mode 100644
index 0000000..ba4ace5
--- /dev/null
+++ b/bin/varnishtest/tests/r01086.vtc
@@ -0,0 +1,76 @@
+varnishtest "#1086 junk after gzip from backend and streaming enabled"
+
+server s1 {
+ # This one will be streamed
+ rxreq
+ txresp -nolen \
+ -hdr "Content-Encoding: gzip" \
+ -hdr "Transfer-Encoding: Chunked" \
+ -hdr "Set-Cookie: FOO"
+ 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"
+
+ chunkedlen 0
+
+ accept
+
+ # This one will not be streamed
+ rxreq
+ txresp -nolen \
+ -hdr "Content-Encoding: gzip" \
+ -hdr "Transfer-Encoding: Chunked" \
+ -hdr "Set-Cookie: BAR"
+ 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"
+
+ 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"
+ rxresp
+ expect resp.status == 200
+ expect resp.bodylen == 0
+} -run
+
+delay .1
+
+client c1 {
+ txreq -hdr "Cookie: BAR"
+ rxresp
+ expect resp.status == 503
+} -run
+
More information about the varnish-commit
mailing list