- fix warnings with etag caching at shutdown
[m6w6/ext-http] / tests / HttpResponse_003.phpt
diff --git a/tests/HttpResponse_003.phpt b/tests/HttpResponse_003.phpt
new file mode 100644 (file)
index 0000000..027d536
--- /dev/null
@@ -0,0 +1,30 @@
+--TEST--
+HttpResponse - send gzipped file with caching headers
+--SKIPIF--
+<?php 
+include 'skip.inc';
+checkver(5);
+checkcgi();
+checkext('zlib');
+?>
+--ENV--
+HTTP_ACCEPT_ENCODING=gzip
+--FILE--
+<?php
+HttpResponse::setGzip(true);
+HttpResponse::setCache(true);
+HttpResponse::setCacheControl('public', 3600);
+HttpResponse::setFile(__FILE__);
+HttpResponse::send();
+?>
+--EXPECTF--
+X-Powered-By: PHP/5.1.0RC2-dev
+ETag: "%s"
+Cache-Control: public, must-revalidate, max_age=3600
+Last-Modified: %s, %d %s 20%d %d:%d:%d GMT
+Content-Type: %s
+Accept-Ranges: bytes
+Content-Encoding: gzip
+Vary: Accept-Encoding
+
+%s