[4.1] 73817d4 Add forgotten test-case

Poul-Henning Kamp phk at FreeBSD.org
Fri Sep 4 15:54:52 CEST 2015


commit 73817d4c288fdd9473bb80f0f358e1461062a47d
Author: Poul-Henning Kamp <phk at FreeBSD.org>
Date:   Mon Aug 3 07:09:09 2015 +0000

    Add forgotten test-case

diff --git a/bin/varnishtest/tests/r01761.vtc b/bin/varnishtest/tests/r01761.vtc
new file mode 100644
index 0000000..a146d2b
--- /dev/null
+++ b/bin/varnishtest/tests/r01761.vtc
@@ -0,0 +1,33 @@
+varnishtest "204 response with body"
+
+server s1 {
+	rxreq
+	txresp -status 204 -body "HiHo"
+} -start
+
+varnish v1 -vcl+backend {
+	sub vcl_backend_response {
+		if (beresp.http.foo == "bar") {
+			set beresp.status = 204;
+		}
+	}
+} -start
+
+client c1 {
+	txreq
+	rxresp
+	expect resp.status == 503
+} -run
+
+server s1 {
+	rxreq
+	txresp -hdr "Foo: bar" -body "HiHo"
+} -start
+
+client c1 {
+	txreq -url /2
+	rxresp
+	expect resp.status == 204
+	expect resp.http.content-length == "<undef>"
+	expect resp.http.transfer-encoding == "<undef>"
+} -run



More information about the varnish-commit mailing list