- fix warnings with etag caching at shutdown
[m6w6/ext-http] / tests / HttpResponse_004.phpt
diff --git a/tests/HttpResponse_004.phpt b/tests/HttpResponse_004.phpt
new file mode 100644 (file)
index 0000000..ed198d6
--- /dev/null
@@ -0,0 +1,26 @@
+--TEST--
+HttpResponse - send cached gzipped data
+--SKIPIF--
+<?php 
+include 'skip.inc';
+checkver(5);
+checkcgi();
+checkext('zlib');
+?>
+--ENV--
+HTTP_ACCEPT_ENCODING=gzip
+HTTP_IF_NONE_MATCH="80b285463881575891e86ba7bfecb4d0"
+--FILE--
+<?php
+HttpResponse::setGzip(true);
+HttpResponse::setCache(true);
+HttpResponse::setCacheControl('public', 3600);
+HttpResponse::setData(file_get_contents(__FILE__));
+HttpResponse::send();
+?>
+--EXPECTF--
+Status: 304
+Content-type: text/html
+X-Powered-By: PHP/5.1.0RC2-dev
+Cache-Control: public, must-revalidate, max_age=3600
+ETag: "80b285463881575891e86ba7bfecb4d0"