[master] 50fdfcf Fix other 304 return cases to not expect a body
Poul-Henning Kamp
phk at varnish-cache.org
Fri Sep 6 23:50:45 CEST 2013
commit 50fdfcfe0565b7cd2f38c2e13b4cc8f44b106334
Author: Poul-Henning Kamp <phk at FreeBSD.org>
Date: Fri Sep 6 17:20:30 2013 +0000
Fix other 304 return cases to not expect a body
diff --git a/bin/varnishtest/tests/c00025.vtc b/bin/varnishtest/tests/c00025.vtc
index d0cd83d..4432918 100644
--- a/bin/varnishtest/tests/c00025.vtc
+++ b/bin/varnishtest/tests/c00025.vtc
@@ -22,7 +22,7 @@ client c1 {
txreq -url "/foo" \
-hdr "If-None-Match: 123456789"
- rxresp
+ rxresp -no_obj
expect resp.status == 304
}
diff --git a/bin/varnishtest/tests/c00026.vtc b/bin/varnishtest/tests/c00026.vtc
index 5dcbd41..9f8c168 100644
--- a/bin/varnishtest/tests/c00026.vtc
+++ b/bin/varnishtest/tests/c00026.vtc
@@ -18,12 +18,12 @@ client c1 {
txreq -url "/foo" \
-hdr "If-None-Match: 123456789"
- rxresp
+ rxresp -no_obj
expect resp.status == 304
txreq -url "/foo" \
-hdr "If-Modified-Since: Thu, 26 Jun 2008 12:00:01 GMT"
- rxresp
+ rxresp -no_obj
expect resp.status == 304
txreq -url "/foo" \
@@ -41,7 +41,7 @@ client c1 {
txreq -url "/foo" \
-hdr "If-Modified-Since: Thu, 26 Jun 2008 12:00:01 GMT" \
-hdr "If-None-Match: 123456789"
- rxresp
+ rxresp -no_obj
expect resp.status == 304
}
diff --git a/bin/varnishtest/tests/r00795.vtc b/bin/varnishtest/tests/r00795.vtc
index 2d832aa..0abfc29 100644
--- a/bin/varnishtest/tests/r00795.vtc
+++ b/bin/varnishtest/tests/r00795.vtc
@@ -1,10 +1,13 @@
varnishtest "Content-Length in pass'ed 304 does not trigger body fetch"
+# XXX: Description doesn't make sense relative to actual goings on...
+
server s1 {
rxreq
txresp -hdr "Last-Modified: ${date}" -body "FOO"
rxreq
- txresp -body "FOO"
+ expect req.url == "/bar"
+ txresp -body "FOOBAR"
} -start
@@ -21,7 +24,7 @@ client c1 {
txreq -url "/bar"
rxresp
expect resp.status == 200
- expect resp.bodylen == 3
+ expect resp.bodylen == 6
} -run
# Wait, so we know ${date} to be higher
@@ -29,12 +32,10 @@ delay 1
client c1 {
txreq -hdr "If-Modified-Since: ${date}"
- rxresp
+ rxresp -no_obj
expect resp.status == 304
- expect resp.bodylen == 0
txreq -url "/bar" -hdr "If-Modified-Since: ${date}"
- rxresp
+ rxresp -no_obj
expect resp.status == 304
- expect resp.bodylen == 0
} -run
diff --git a/bin/varnishtest/tests/r00803.vtc b/bin/varnishtest/tests/r00803.vtc
index 7e47503..50b25fb 100644
--- a/bin/varnishtest/tests/r00803.vtc
+++ b/bin/varnishtest/tests/r00803.vtc
@@ -15,6 +15,6 @@ varnish v1 -vcl+backend {
client c1 {
txreq
- rxresp
+ rxresp -no_obj
expect resp.status == 304
} -run
diff --git a/bin/varnishtest/tests/r00806.vtc b/bin/varnishtest/tests/r00806.vtc
index 7e8fdbc..f5ee9e3 100644
--- a/bin/varnishtest/tests/r00806.vtc
+++ b/bin/varnishtest/tests/r00806.vtc
@@ -20,7 +20,7 @@ varnish v1 -vcl+backend {
client c1 {
txreq
- rxresp
+ rxresp -no_obj
expect resp.status == 304
expect resp.http.cl == 100
} -run
diff --git a/bin/varnishtest/tests/r00907.vtc b/bin/varnishtest/tests/r00907.vtc
index b64a160..679dab2 100644
--- a/bin/varnishtest/tests/r00907.vtc
+++ b/bin/varnishtest/tests/r00907.vtc
@@ -15,17 +15,17 @@ varnish v1 -vcl+backend {
client c1 {
txreq -hdr "If-None-Match: saengei1Ohshicich4iteesu"
- rxresp
+ rxresp -no_obj
expect resp.status == 304
txreq -hdr "If-None-Match: saengei1Ohshicich4iteesu" \
-hdr "If-Modified-Since: Tue, 20 Sep 2011 18:54:59 GMT"
- rxresp
+ rxresp -no_obj
expect resp.status == 200
txreq -hdr "If-None-Match: saengei1Ohshicich4iteesu" \
-hdr "If-Modified-Since: Tue, 20 Sep 2011 18:55:00 GMT"
- rxresp
+ rxresp -no_obj
expect resp.status == 304
} -run
diff --git a/bin/varnishtest/tests/r00972.vtc b/bin/varnishtest/tests/r00972.vtc
index da23127..d5e0f0e 100644
--- a/bin/varnishtest/tests/r00972.vtc
+++ b/bin/varnishtest/tests/r00972.vtc
@@ -13,9 +13,8 @@ varnish v1 -vcl+backend {
client c1 {
txreq -hdr "If-None-Match: foo"
- rxresp
+ rxresp -no_obj
expect resp.status == 304
expect resp.http.etag == "foo"
- expect resp.bodylen == 0
} -run
More information about the varnish-commit
mailing list