diff options
author | Ondřej Surý <ondrej@sury.org> | 2013-10-27 20:38:12 +0100 |
---|---|---|
committer | Ondřej Surý <ondrej@sury.org> | 2013-10-27 20:38:12 +0100 |
commit | 749e5ad39dbac3f4f62be438367f8cdf90056815 (patch) | |
tree | ad0677df3bf44a6761380686e400ffd878585288 /ext/zlib | |
parent | 4ed39205864f58ba7c368e4ae1362d8214469fd9 (diff) | |
download | php-749e5ad39dbac3f4f62be438367f8cdf90056815.tar.gz |
New upstream version 5.4.21upstream/5.4.21
Diffstat (limited to 'ext/zlib')
31 files changed, 63 insertions, 31 deletions
diff --git a/ext/zlib/tests/bug61139.phpt b/ext/zlib/tests/bug61139.phpt index eaca00369..71961a64d 100644 --- a/ext/zlib/tests/bug61139.phpt +++ b/ext/zlib/tests/bug61139.phpt @@ -10,5 +10,9 @@ if (!extension_loaded('zlib')) { <?php gzopen('someFile', 'c'); +--CLEAN-- +<?php + unlink('someFile'); +?> --EXPECTF-- Warning: gzopen(): gzopen failed in %s on line %d diff --git a/ext/zlib/tests/bug65391.phpt b/ext/zlib/tests/bug65391.phpt new file mode 100644 index 000000000..3ba535081 --- /dev/null +++ b/ext/zlib/tests/bug65391.phpt @@ -0,0 +1,28 @@ +--TEST-- +Bug #65391 (Unable to send vary header user-agent when ob_start('ob_gzhandler') is called) +--SKIPIF-- +<?php +extension_loaded("zlib") or die("skip need zlib"); +?> +--GET-- +dummy=1 +--FILE-- +<?php +header("Vary: Cookie"); +ob_start("ob_gzhandler"); + +// run-tests cannot test for a multiple Vary header +ob_flush(); +print_r(headers_list()); + +?> +Done +--EXPECTF-- +Array +( + [0] => X-Powered-By: PHP/%s + [1] => Vary: Cookie + [2] => Vary: Accept-Encoding +) +Done + diff --git a/ext/zlib/tests/gzfile_variation1.phpt b/ext/zlib/tests/gzfile_variation1.phpt index 767abb7e3..131170b4b 100644 --- a/ext/zlib/tests/gzfile_variation1.phpt +++ b/ext/zlib/tests/gzfile_variation1.phpt @@ -1,5 +1,5 @@ --TEST-- -Test function gzfile() by substituting agument 1 with array values. +Test function gzfile() by substituting argument 1 with array values. --SKIPIF-- <?php if (!extension_loaded('zlib')) die ('skip zlib extension not available in this build'); diff --git a/ext/zlib/tests/gzfile_variation10.phpt b/ext/zlib/tests/gzfile_variation10.phpt index 2a6d8915d..20de8cb53 100644 --- a/ext/zlib/tests/gzfile_variation10.phpt +++ b/ext/zlib/tests/gzfile_variation10.phpt @@ -1,5 +1,5 @@ --TEST-- -Test function gzfile() by substituting agument 2 with emptyUnsetUndefNull values. +Test function gzfile() by substituting argument 2 with emptyUnsetUndefNull values. --SKIPIF-- <?php if (!extension_loaded('zlib')) die ('skip zlib extension not available in this build'); diff --git a/ext/zlib/tests/gzfile_variation11.phpt b/ext/zlib/tests/gzfile_variation11.phpt index 02faa4501..a3585e542 100644 --- a/ext/zlib/tests/gzfile_variation11.phpt +++ b/ext/zlib/tests/gzfile_variation11.phpt @@ -1,5 +1,5 @@ --TEST-- -Test function gzfile() by substituting agument 2 with float values. +Test function gzfile() by substituting argument 2 with float values. --SKIPIF-- <?php if (!extension_loaded('zlib')) die ('skip zlib extension not available in this build'); diff --git a/ext/zlib/tests/gzfile_variation12.phpt b/ext/zlib/tests/gzfile_variation12.phpt index a8efc7616..be28f0168 100644 --- a/ext/zlib/tests/gzfile_variation12.phpt +++ b/ext/zlib/tests/gzfile_variation12.phpt @@ -1,5 +1,5 @@ --TEST-- -Test function gzfile() by substituting agument 2 with int values. +Test function gzfile() by substituting argument 2 with int values. --SKIPIF-- <?php if (!extension_loaded('zlib')) die ('skip zlib extension not available in this build'); diff --git a/ext/zlib/tests/gzfile_variation13.phpt b/ext/zlib/tests/gzfile_variation13.phpt index 8014d7d9d..4198c474d 100644 --- a/ext/zlib/tests/gzfile_variation13.phpt +++ b/ext/zlib/tests/gzfile_variation13.phpt @@ -1,5 +1,5 @@ --TEST-- -Test function gzfile() by substituting agument 2 with object values. +Test function gzfile() by substituting argument 2 with object values. --SKIPIF-- <?php if (!extension_loaded('zlib')) die ('skip zlib extension not available in this build'); diff --git a/ext/zlib/tests/gzfile_variation14.phpt b/ext/zlib/tests/gzfile_variation14.phpt index 8eb183c1c..7462bea80 100644 --- a/ext/zlib/tests/gzfile_variation14.phpt +++ b/ext/zlib/tests/gzfile_variation14.phpt @@ -1,5 +1,5 @@ --TEST-- -Test function gzfile() by substituting agument 2 with string values. +Test function gzfile() by substituting argument 2 with string values. --SKIPIF-- <?php if (!extension_loaded('zlib')) die ('skip zlib extension not available in this build'); diff --git a/ext/zlib/tests/gzfile_variation2.phpt b/ext/zlib/tests/gzfile_variation2.phpt index 2f75c7f81..ba487435c 100644 --- a/ext/zlib/tests/gzfile_variation2.phpt +++ b/ext/zlib/tests/gzfile_variation2.phpt @@ -1,5 +1,5 @@ --TEST-- -Test function gzfile() by substituting agument 1 with boolean values. +Test function gzfile() by substituting argument 1 with boolean values. --SKIPIF-- <?php if (!extension_loaded('zlib')) die ('skip zlib extension not available in this build'); diff --git a/ext/zlib/tests/gzfile_variation3.phpt b/ext/zlib/tests/gzfile_variation3.phpt index 8a6f2cec2..cf4520d41 100644 --- a/ext/zlib/tests/gzfile_variation3.phpt +++ b/ext/zlib/tests/gzfile_variation3.phpt @@ -1,5 +1,5 @@ --TEST-- -Test function gzfile() by substituting agument 1 with emptyUnsetUndefNull values. +Test function gzfile() by substituting argument 1 with emptyUnsetUndefNull values. --SKIPIF-- <?php if (!extension_loaded('zlib')) die ('skip zlib extension not available in this build'); diff --git a/ext/zlib/tests/gzfile_variation4.phpt b/ext/zlib/tests/gzfile_variation4.phpt index b3c8ac483..331023156 100644 --- a/ext/zlib/tests/gzfile_variation4.phpt +++ b/ext/zlib/tests/gzfile_variation4.phpt @@ -1,5 +1,5 @@ --TEST-- -Test function gzfile() by substituting agument 1 with float values. +Test function gzfile() by substituting argument 1 with float values. --SKIPIF-- <?php if (!extension_loaded(zlib)) die ('skip zlib extension not available in this build'); diff --git a/ext/zlib/tests/gzfile_variation5.phpt b/ext/zlib/tests/gzfile_variation5.phpt index 5e210b653..6a874a578 100644 --- a/ext/zlib/tests/gzfile_variation5.phpt +++ b/ext/zlib/tests/gzfile_variation5.phpt @@ -1,5 +1,5 @@ --TEST-- -Test function gzfile() by substituting agument 1 with int values. +Test function gzfile() by substituting argument 1 with int values. --SKIPIF-- <?php if (!extension_loaded('zlib')) die ('skip zlib extension not available in this build'); diff --git a/ext/zlib/tests/gzfile_variation6.phpt b/ext/zlib/tests/gzfile_variation6.phpt index 1ce1be659..64168180f 100644 --- a/ext/zlib/tests/gzfile_variation6.phpt +++ b/ext/zlib/tests/gzfile_variation6.phpt @@ -1,5 +1,5 @@ --TEST-- -Test function gzfile() by substituting agument 1 with object values. +Test function gzfile() by substituting argument 1 with object values. --SKIPIF-- <?php if (!extension_loaded('zlib')) die ('skip zlib extension not available in this build'); diff --git a/ext/zlib/tests/gzfile_variation7.phpt b/ext/zlib/tests/gzfile_variation7.phpt index b441dd670..c9dd29826 100644 --- a/ext/zlib/tests/gzfile_variation7.phpt +++ b/ext/zlib/tests/gzfile_variation7.phpt @@ -1,5 +1,5 @@ --TEST-- -Test function gzfile() by substituting agument 1 with string values. +Test function gzfile() by substituting argument 1 with string values. --SKIPIF-- <?php if (!extension_loaded('zlib')) die ('skip zlib extension not available in this build'); diff --git a/ext/zlib/tests/gzfile_variation8.phpt b/ext/zlib/tests/gzfile_variation8.phpt index 32d969326..50d042218 100644 --- a/ext/zlib/tests/gzfile_variation8.phpt +++ b/ext/zlib/tests/gzfile_variation8.phpt @@ -1,5 +1,5 @@ --TEST-- -Test function gzfile() by substituting agument 2 with array values. +Test function gzfile() by substituting argument 2 with array values. --SKIPIF-- <?php if (!extension_loaded('zlib')) die ('skip zlib extension not available in this build'); diff --git a/ext/zlib/tests/gzfile_variation9.phpt b/ext/zlib/tests/gzfile_variation9.phpt index c2c24ae26..3675dcbef 100644 --- a/ext/zlib/tests/gzfile_variation9.phpt +++ b/ext/zlib/tests/gzfile_variation9.phpt @@ -1,5 +1,5 @@ --TEST-- -Test function gzfile() by substituting agument 2 with boolean values. +Test function gzfile() by substituting argument 2 with boolean values. --SKIPIF-- <?php if (!extension_loaded('zlib')) die ('skip zlib extension not available in this build'); diff --git a/ext/zlib/tests/readgzfile_variation1.phpt b/ext/zlib/tests/readgzfile_variation1.phpt index e31824ce1..5a5ec4f6e 100644 --- a/ext/zlib/tests/readgzfile_variation1.phpt +++ b/ext/zlib/tests/readgzfile_variation1.phpt @@ -1,5 +1,5 @@ --TEST-- -Test function readgzfile() by substituting agument 1 with array values. +Test function readgzfile() by substituting argument 1 with array values. --SKIPIF-- <?php if (!extension_loaded('zlib')) die ('skip zlib extension not available in this build'); diff --git a/ext/zlib/tests/readgzfile_variation10.phpt b/ext/zlib/tests/readgzfile_variation10.phpt index 29249a1f2..bc6cc5b45 100644 --- a/ext/zlib/tests/readgzfile_variation10.phpt +++ b/ext/zlib/tests/readgzfile_variation10.phpt @@ -1,5 +1,5 @@ --TEST-- -Test function readgzfile() by substituting agument 2 with emptyUnsetUndefNull values. +Test function readgzfile() by substituting argument 2 with emptyUnsetUndefNull values. --SKIPIF-- <?php if (!extension_loaded('zlib')) die ('skip zlib extension not available in this build'); diff --git a/ext/zlib/tests/readgzfile_variation11.phpt b/ext/zlib/tests/readgzfile_variation11.phpt index 4023211ff..01dc78721 100644 --- a/ext/zlib/tests/readgzfile_variation11.phpt +++ b/ext/zlib/tests/readgzfile_variation11.phpt @@ -1,5 +1,5 @@ --TEST-- -Test function readgzfile() by substituting agument 2 with float values. +Test function readgzfile() by substituting argument 2 with float values. --SKIPIF-- <?php if (!extension_loaded('zlib')) die ('skip zlib extension not available in this build'); diff --git a/ext/zlib/tests/readgzfile_variation12.phpt b/ext/zlib/tests/readgzfile_variation12.phpt index 8c291a4f4..06486acdd 100644 --- a/ext/zlib/tests/readgzfile_variation12.phpt +++ b/ext/zlib/tests/readgzfile_variation12.phpt @@ -1,5 +1,5 @@ --TEST-- -Test function readgzfile() by substituting agument 2 with int values. +Test function readgzfile() by substituting argument 2 with int values. --SKIPIF-- <?php if (!extension_loaded('zlib')) die ('skip zlib extension not available in this build'); diff --git a/ext/zlib/tests/readgzfile_variation13.phpt b/ext/zlib/tests/readgzfile_variation13.phpt index 117860eb4..db1bd892a 100644 --- a/ext/zlib/tests/readgzfile_variation13.phpt +++ b/ext/zlib/tests/readgzfile_variation13.phpt @@ -1,5 +1,5 @@ --TEST-- -Test function readgzfile() by substituting agument 2 with object values. +Test function readgzfile() by substituting argument 2 with object values. --SKIPIF-- <?php if (!extension_loaded('zlib')) die ('skip zlib extension not available in this build'); diff --git a/ext/zlib/tests/readgzfile_variation14.phpt b/ext/zlib/tests/readgzfile_variation14.phpt index ee0d6d6d4..90081a946 100644 --- a/ext/zlib/tests/readgzfile_variation14.phpt +++ b/ext/zlib/tests/readgzfile_variation14.phpt @@ -1,5 +1,5 @@ --TEST-- -Test function readgzfile() by substituting agument 2 with string values. +Test function readgzfile() by substituting argument 2 with string values. --SKIPIF-- <?php if (!extension_loaded('zlib')) die ('skip zlib extension not available in this build'); diff --git a/ext/zlib/tests/readgzfile_variation2.phpt b/ext/zlib/tests/readgzfile_variation2.phpt index 367cc401b..53a9f3e31 100644 --- a/ext/zlib/tests/readgzfile_variation2.phpt +++ b/ext/zlib/tests/readgzfile_variation2.phpt @@ -1,5 +1,5 @@ --TEST-- -Test function readgzfile() by substituting agument 1 with boolean values. +Test function readgzfile() by substituting argument 1 with boolean values. --SKIPIF-- <?php if (!extension_loaded('zlib')) die ('skip zlib extension not available in this build'); diff --git a/ext/zlib/tests/readgzfile_variation3.phpt b/ext/zlib/tests/readgzfile_variation3.phpt index 6645d67b7..8afb16946 100644 --- a/ext/zlib/tests/readgzfile_variation3.phpt +++ b/ext/zlib/tests/readgzfile_variation3.phpt @@ -1,5 +1,5 @@ --TEST-- -Test function readgzfile() by substituting agument 1 with emptyUnsetUndefNull values. +Test function readgzfile() by substituting argument 1 with emptyUnsetUndefNull values. --SKIPIF-- <?php if (!extension_loaded('zlib')) die ('skip zlib extension not available in this build'); diff --git a/ext/zlib/tests/readgzfile_variation4.phpt b/ext/zlib/tests/readgzfile_variation4.phpt index ece84a990..00211f7df 100644 --- a/ext/zlib/tests/readgzfile_variation4.phpt +++ b/ext/zlib/tests/readgzfile_variation4.phpt @@ -1,5 +1,5 @@ --TEST-- -Test function readgzfile() by substituting agument 1 with float values. +Test function readgzfile() by substituting argument 1 with float values. --SKIPIF-- <?php if (!extension_loaded(zlib)) die ('skip zlib extension not available in this build'); diff --git a/ext/zlib/tests/readgzfile_variation5.phpt b/ext/zlib/tests/readgzfile_variation5.phpt index 460e18893..2aa83fde3 100644 --- a/ext/zlib/tests/readgzfile_variation5.phpt +++ b/ext/zlib/tests/readgzfile_variation5.phpt @@ -1,5 +1,5 @@ --TEST-- -Test function readgzfile() by substituting agument 1 with int values. +Test function readgzfile() by substituting argument 1 with int values. --SKIPIF-- <?php if (!extension_loaded('zlib')) die ('skip zlib extension not available in this build'); diff --git a/ext/zlib/tests/readgzfile_variation6.phpt b/ext/zlib/tests/readgzfile_variation6.phpt index 69a4dc190..702f91850 100644 --- a/ext/zlib/tests/readgzfile_variation6.phpt +++ b/ext/zlib/tests/readgzfile_variation6.phpt @@ -1,5 +1,5 @@ --TEST-- -Test function readgzfile() by substituting agument 1 with object values. +Test function readgzfile() by substituting argument 1 with object values. --SKIPIF-- <?php if (!extension_loaded('zlib')) die ('skip zlib extension not available in this build'); diff --git a/ext/zlib/tests/readgzfile_variation7.phpt b/ext/zlib/tests/readgzfile_variation7.phpt index 20162b5cb..f4abdac9b 100644 --- a/ext/zlib/tests/readgzfile_variation7.phpt +++ b/ext/zlib/tests/readgzfile_variation7.phpt @@ -1,5 +1,5 @@ --TEST-- -Test function readgzfile() by substituting agument 1 with string values. +Test function readgzfile() by substituting argument 1 with string values. --SKIPIF-- <?php if (!extension_loaded('zlib')) die ('skip zlib extension not available in this build'); diff --git a/ext/zlib/tests/readgzfile_variation8.phpt b/ext/zlib/tests/readgzfile_variation8.phpt index 2e155288f..291b69efc 100644 --- a/ext/zlib/tests/readgzfile_variation8.phpt +++ b/ext/zlib/tests/readgzfile_variation8.phpt @@ -1,5 +1,5 @@ --TEST-- -Test function readgzfile() by substituting agument 2 with array values. +Test function readgzfile() by substituting argument 2 with array values. --SKIPIF-- <?php if (!extension_loaded('zlib')) die ('skip zlib extension not available in this build'); diff --git a/ext/zlib/tests/readgzfile_variation9.phpt b/ext/zlib/tests/readgzfile_variation9.phpt index 5cdb5b5da..d90058f8d 100644 --- a/ext/zlib/tests/readgzfile_variation9.phpt +++ b/ext/zlib/tests/readgzfile_variation9.phpt @@ -1,5 +1,5 @@ --TEST-- -Test function readgzfile() by substituting agument 2 with boolean values. +Test function readgzfile() by substituting argument 2 with boolean values. --SKIPIF-- <?php if (!extension_loaded('zlib')) die ('skip zlib extension not available in this build'); diff --git a/ext/zlib/zlib.c b/ext/zlib/zlib.c index 1a202e344..1114bc8a6 100644 --- a/ext/zlib/zlib.c +++ b/ext/zlib/zlib.c @@ -190,7 +190,7 @@ static int php_zlib_output_handler(void **handler_context, php_output_context *o if ((output_context->op & PHP_OUTPUT_HANDLER_START) && (output_context->op != (PHP_OUTPUT_HANDLER_START|PHP_OUTPUT_HANDLER_CLEAN|PHP_OUTPUT_HANDLER_FINAL)) ) { - sapi_add_header_ex(ZEND_STRL("Vary: Accept-Encoding"), 1, 1 TSRMLS_CC); + sapi_add_header_ex(ZEND_STRL("Vary: Accept-Encoding"), 1, 0 TSRMLS_CC); } return FAILURE; } @@ -220,7 +220,7 @@ static int php_zlib_output_handler(void **handler_context, php_output_context *o deflateEnd(&ctx->Z); return FAILURE; } - sapi_add_header_ex(ZEND_STRL("Vary: Accept-Encoding"), 1, 1 TSRMLS_CC); + sapi_add_header_ex(ZEND_STRL("Vary: Accept-Encoding"), 1, 0 TSRMLS_CC); php_output_handler_hook(PHP_OUTPUT_HANDLER_HOOK_IMMUTABLE, NULL TSRMLS_CC); } } @@ -478,7 +478,7 @@ static PHP_FUNCTION(ob_gzhandler) sapi_add_header_ex(ZEND_STRL("Content-Encoding: deflate"), 1, 1 TSRMLS_CC); break; } - sapi_add_header_ex(ZEND_STRL("Vary: Accept-Encoding"), 1, 1 TSRMLS_CC); + sapi_add_header_ex(ZEND_STRL("Vary: Accept-Encoding"), 1, 0 TSRMLS_CC); } if (!ZLIBG(ob_gzhandler)) { |