- changelog
[m6w6/ext-http] / tests / HttpResponse_003.phpt
1 --TEST--
2 HttpResponse - send gzipped file with caching headers
3 --SKIPIF--
4 <?php
5 include 'skip.inc';
6 checkmin(5);
7 checkcgi();
8 skipif(!http_support(HTTP_SUPPORT_ENCODINGS), "need zlib support");
9 ?>
10 --ENV--
11 HTTP_ACCEPT_ENCODING=gzip
12 --FILE--
13 <?php
14 HttpResponse::setGzip(true);
15 HttpResponse::setCache(true);
16 HttpResponse::setCacheControl('public', 3600);
17 HttpResponse::setFile(__FILE__);
18 HttpResponse::send();
19 ?>
20 --EXPECTF--
21 X-Powered-By: PHP/%s
22 Cache-Control: public, must-revalidate, max-age=3600
23 Last-Modified: %s, %d %s 20%d %d:%d:%d GMT
24 Content-Type: %s
25 Accept-Ranges: bytes
26 ETag: "%s"
27 Content-Encoding: gzip
28 Vary: Accept-Encoding
29
30 %s