- add preliminary ext/hash support (currently only for Win32)
[m6w6/ext-http] / tests / etag_mode_015.phpt
diff --git a/tests/etag_mode_015.phpt b/tests/etag_mode_015.phpt
new file mode 100644 (file)
index 0000000..d156bb9
--- /dev/null
@@ -0,0 +1,22 @@
+--TEST--
+ob ext/hash etag
+--SKIPIF--
+<?php
+include 'skip.inc';
+checkcgi();
+checkmax(5.0);
+skipif(!defined('HTTP_ETAG_SHA256'), 'need ext/hash support');
+?>
+--FILE--
+<?php
+ini_set('http.etag_mode', HTTP_ETAG_SHA256);
+http_cache_etag();
+print("abc\n");
+?>
+--EXPECTF--
+Content-type: %s
+X-Powered-By: PHP/%s
+Cache-Control: private, must-revalidate, max-age=0
+ETag: "edeaaff3f1774ad2888673770c6d64097e391bc362d7d6fb34982ddf0efd18cb"
+
+abc