projects
/
m6w6
/
ext-http
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
|
github
raw
|
inline
| side by side
- fix build --without-http-curl-requests
[m6w6/ext-http]
/
tests
/
HttpResponse_004.phpt
diff --git
a/tests/HttpResponse_004.phpt
b/tests/HttpResponse_004.phpt
index a0f569dfe5c2ec47e62af8d376eab2b80b231c05..4e6d30c2d77198500cff073074918110ebba4770 100644
(file)
--- a/
tests/HttpResponse_004.phpt
+++ b/
tests/HttpResponse_004.phpt
@@
-3,24
+3,25
@@
HttpResponse - send cached gzipped data
--SKIPIF--
<?php
include 'skip.inc';
--SKIPIF--
<?php
include 'skip.inc';
-checkver(5);
checkcgi();
checkcgi();
-checkext('zlib');
+checkmin(5.1);
+skipif(!http_support(HTTP_SUPPORT_ENCODINGS), "need zlib support");
?>
?>
---ENV--
-HTTP_ACCEPT_ENCODING=gzip
-HTTP_IF_NONE_MATCH="80b285463881575891e86ba7bfecb4d0"
--FILE--
<?php
--FILE--
<?php
+$_SERVER["HTTP_IF_NONE_MATCH"] = '"900150983cd24fb0d6963f7d28e17f72"';
+$_SERVER["HTTP_ACCEPT_ENCODING"] = "gzip";
HttpResponse::setGzip(true);
HttpResponse::setCache(true);
HttpResponse::setCacheControl('public', 3600);
HttpResponse::setGzip(true);
HttpResponse::setCache(true);
HttpResponse::setCacheControl('public', 3600);
-HttpResponse::setData(
file_get_contents(__FILE__)
);
+HttpResponse::setData(
"abc"
);
HttpResponse::send();
?>
--EXPECTF--
Status: 304
HttpResponse::send();
?>
--EXPECTF--
Status: 304
-Content-type: %s
X-Powered-By: PHP/%s
X-Powered-By: PHP/%s
-Cache-Control: public, must-revalidate, max_age=3600
-ETag: "80b285463881575891e86ba7bfecb4d0"
+Cache-Control: public, must-revalidate, max-age=3600
+Last-Modified: %s
+Content-Type: %s
+Accept-Ranges: bytes
+ETag: "900150983cd24fb0d6963f7d28e17f72"