- improve response performance
[m6w6/ext-http] / tests / HttpResponse_004.phpt
1 --TEST--
2 HttpResponse - send cached gzipped data
3 --SKIPIF--
4 <?php
5 include 'skip.inc';
6 checkcgi();
7 checkmin(5.1);
8 skipif(!http_support(HTTP_SUPPORT_ENCODINGS), "need zlib support");
9 ?>
10 --ENV--
11 HTTP_IF_NONE_MATCH="900150983cd24fb0d6963f7d28e17f72"
12 HTTP_ACCEPT_ENCODING=gzip
13 --FILE--
14 <?php
15 HttpResponse::setGzip(true);
16 HttpResponse::setCache(true);
17 HttpResponse::setCacheControl('public', 3600);
18 HttpResponse::setData("abc");
19 HttpResponse::send();
20 ?>
21 --EXPECTF--
22 Status: 304
23 X-Powered-By: PHP/%s
24 Cache-Control: public, must-revalidate, max-age=3600
25 Last-Modified: %s
26 Content-Type: %s
27 Accept-Ranges: bytes
28 ETag: "900150983cd24fb0d6963f7d28e17f72"