From: Ilia Alshanetsky Date: Mon, 7 May 2007 18:40:33 +0000 (+0000) Subject: Added support for --GZIP_POST-- and --DEFLATE_POST-- that allows emulation X-Git-Tag: php-5.2.3RC1~138 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=146a60071192cff25737d4d360f5118b8cf90882;p=php Added support for --GZIP_POST-- and --DEFLATE_POST-- that allows emulation of compressed POST input --- diff --git a/run-tests.php b/run-tests.php index 38e4ed5545..c6bf1fce2f 100755 --- a/run-tests.php +++ b/run-tests.php @@ -1328,6 +1328,15 @@ TEST $file } elseif (array_key_exists('POST', $section_text) && !empty($section_text['POST'])) { $post = trim($section_text['POST']); + + if (array_key_exists('GZIP_POST', $section_text) && function_exists('gzencode')) { + $post = gzencode($post, 9, FORCE_GZIP); + $env['HTTP_CONTENT_ENCODING'] = 'gzip'; + } else if (array_key_exists('DEFLATE_POST', $section_text) && function_exists('gzcompress')) { + $post = gzcompress($post, 9); + $env['HTTP_CONTENT_ENCODING'] = 'deflate'; + } + save_text($tmp_post, $post); $content_length = strlen($post);