X-Git-Url: https://git.m6w6.name/?a=blobdiff_plain;f=tests%2Fenvresponse005.phpt;fp=tests%2Fenvresponse005.phpt;h=6d55168c092a4ca92c6045ceea329dc191744128;hb=87db9817d428282792c8146d9c2ae9748ebf6f1e;hp=0000000000000000000000000000000000000000;hpb=7a5c865f6faf8b1b6c91735e9d3b040449ea74ba;p=m6w6%2Fext-http diff --git a/tests/envresponse005.phpt b/tests/envresponse005.phpt new file mode 100644 index 0000000..6d55168 --- /dev/null +++ b/tests/envresponse005.phpt @@ -0,0 +1,23 @@ +--TEST-- +env response cache positive +--SKIPIF-- + +--GET-- +a=b +--ENV-- +HTTP_IF_MODIFIED_SINCE=Fri, 13 Feb 2009 23:31:32 GMT +--FILE-- +setBody(new http\Message\Body(fopen(__FILE__,"rb"))); +$r->setEtag("abc"); +$r->setLastModified(1234567891); +$r->isCachedByEtag("If-None-Match") and die("Huh? etag? really?\n"); +$r->isCachedByLastModified("If-Modified-Since") or die("yep, I should be cached"); +$r->send(); +?> +--EXPECTHEADERS-- +HTTP/1.1 304 Not Modified +ETag: "abc" +Last-Modified: Fri, 13 Feb 2009 23:31:31 GMT +--EXPECT--