projects
/
m6w6
/
ext-http
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
|
github
raw
|
inline
| side by side
prepare v3.2.1
[m6w6/ext-http]
/
tests
/
etag001.phpt
diff --git
a/tests/etag001.phpt
b/tests/etag001.phpt
index c1e1e44c897a92587198dcab8fd16bb1bf156703..a7afd14fccd48b757dfea6f5a4a420a537d948ea 100644
(file)
--- a/
tests/etag001.phpt
+++ b/
tests/etag001.phpt
@@
-1,27
+1,22
@@
--TEST--
etags with hash
--SKIPIF--
--TEST--
etags with hash
--SKIPIF--
-<?php
-include "skipif.inc";
-_ext("hash");
-version_compare(PHP_VERSION, "5.4.0", ">=") or die("skip PHP>=5.4 required");
+<?php
+include "skipif.inc";
+_ext("hash");
?>
--FILE--
<?php
$body = new http\Message\Body;
$body->append("Hello, my old fellow.");
foreach (hash_algos() as $algo) {
?>
--FILE--
<?php
$body = new http\Message\Body;
$body->append("Hello, my old fellow.");
foreach (hash_algos() as $algo) {
- switch ($algo) {
- case "gost-crypto":
- case "fnv1a32":
- case "fnv1a64":
- continue 2;
+ if (strncmp($algo, "sha3-", 5) && strncmp($algo, "sha512/", 7) && strcmp($algo, "crc32c")) {
+ ini_set("http.etag.mode", $algo);
+ printf("%10s: %s\n",
+ $algo,
+ $body->etag()
+ );
}
}
- ini_set("http.etag.mode", $algo);
- printf("%10s: %s\n",
- $algo,
- $body->etag()
- );
}
?>
DONE
}
?>
DONE
@@
-48,11
+43,14
@@
tiger192,4: e6a1628a4da8fa6adf4ca866c5e235b51939bb61ecf8423f
snefru: 8f50c66c8f0a1510f9c591a2b7a070853d4770c60a38394c8857918dd91a2e5b
snefru256: 8f50c66c8f0a1510f9c591a2b7a070853d4770c60a38394c8857918dd91a2e5b
gost: efc79cdd01331adf80b30af816ff7a934f3f3df3085294a310918cacff3500f0
snefru: 8f50c66c8f0a1510f9c591a2b7a070853d4770c60a38394c8857918dd91a2e5b
snefru256: 8f50c66c8f0a1510f9c591a2b7a070853d4770c60a38394c8857918dd91a2e5b
gost: efc79cdd01331adf80b30af816ff7a934f3f3df3085294a310918cacff3500f0
+gost-crypto: 2e6bd37841520cc9ccb8c7abd68bd3ec9ce601651b995f3639090f585cc23684
adler32: 4ff5075d
crc32: 757b06f7
crc32b: e56655c5
fnv132: ebd1fa1f
adler32: 4ff5075d
crc32: 757b06f7
crc32b: e56655c5
fnv132: ebd1fa1f
+ fnv1a32: 8e2ee037
fnv164: 9790ce01eba3ae9f
fnv164: 9790ce01eba3ae9f
+ fnv1a64: 43ef200fe3ef9b37
joaat: 70a407c9
haval128,3: 68a1bee33d2a4fa5543be7fa871f84ea
haval160,3: b4204e8c4f3c993385d997539afa723888700bbd
joaat: 70a407c9
haval128,3: 68a1bee33d2a4fa5543be7fa871f84ea
haval160,3: b4204e8c4f3c993385d997539afa723888700bbd