[master] 216bea7 add testcase for 1672
Poul-Henning Kamp
phk at FreeBSD.org
Mon Feb 9 11:34:50 CET 2015
commit 216bea7e84ea605a48e62923fd6afd0069d3301a
Author: Poul-Henning Kamp <phk at FreeBSD.org>
Date: Mon Feb 9 10:34:42 2015 +0000
add testcase for 1672
diff --git a/bin/varnishtest/tests/r01672.vtc b/bin/varnishtest/tests/r01672.vtc
new file mode 100644
index 0000000..e59670d
--- /dev/null
+++ b/bin/varnishtest/tests/r01672.vtc
@@ -0,0 +1,34 @@
+varnishtest "#1672: Bogus 304 backend reply"
+
+# First serve a non-200 status object to the cache,
+# then revalidate it unconditionally
+
+server s1 {
+ rxreq
+ txresp -status 404
+
+ rxreq
+ txresp -status 304
+} -start
+
+varnish v1 -vcl+backend {
+ sub vcl_backend_response {
+ set beresp.ttl = 0.1s;
+ set beresp.grace = 0s;
+ set beresp.keep = 10s;
+ }
+} -start
+
+client c1 {
+ txreq
+ rxresp
+ expect resp.status == 404
+} -run
+
+delay 0.2
+
+client c1 {
+ txreq
+ rxresp
+ expect resp.status == 503
+} -run
More information about the varnish-commit
mailing list