summaryrefslogtreecommitdiff
path: root/tests/cachable.t
diff options
context:
space:
mode:
Diffstat (limited to 'tests/cachable.t')
-rwxr-xr-xtests/cachable.t10
1 files changed, 5 insertions, 5 deletions
diff --git a/tests/cachable.t b/tests/cachable.t
index 605a68f..381f44e 100755
--- a/tests/cachable.t
+++ b/tests/cachable.t
@@ -78,8 +78,8 @@ If-None-Match: $etag
If-Modified-Since: Sun, 01 Jan 1970 00:00:01 GMT; foo
EOF
);
-$t->{RESPONSE} = [ { 'HTTP-Protocol' => 'HTTP/1.0', 'HTTP-Status' => 200 } ];
-ok($tf->handle_http($t) == 0, 'Conditional GET - ETag + old Last-Modified');
+$t->{RESPONSE} = [ { 'HTTP-Protocol' => 'HTTP/1.0', 'HTTP-Status' => 304 } ];
+ok($tf->handle_http($t) == 0, 'Conditional GET - ETag + old Last-Modified (which should be ignored)');
$t->{REQUEST} = ( <<EOF
GET / HTTP/1.0
@@ -88,7 +88,7 @@ If-Modified-Since: $now; foo
EOF
);
$t->{RESPONSE} = [ { 'HTTP-Protocol' => 'HTTP/1.0', 'HTTP-Status' => 304 } ];
-ok($tf->handle_http($t) == 0, 'Conditional GET - ETag, Last-Modified + comment');
+ok($tf->handle_http($t) == 0, 'Conditional GET - ETag, Last-Modified + comment (which should be ignored)');
$t->{REQUEST} = ( <<EOF
GET / HTTP/1.0
@@ -105,8 +105,8 @@ If-None-Match: $etag
If-Modified-Since: $now foo
EOF
);
-$t->{RESPONSE} = [ { 'HTTP-Protocol' => 'HTTP/1.0', 'HTTP-Status' => 412 } ];
-ok($tf->handle_http($t) == 0, 'Conditional GET - ETag + Last-Modified + overlong timestamp');
+$t->{RESPONSE} = [ { 'HTTP-Protocol' => 'HTTP/1.0', 'HTTP-Status' => 304 } ];
+ok($tf->handle_http($t) == 0, 'Conditional GET - ETag + Last-Modified + overlong timestamp (which should be ignored)');
$t->{REQUEST} = ( <<EOF
GET / HTTP/1.0