summaryrefslogtreecommitdiff
path: root/run-tests.php
diff options
context:
space:
mode:
authorIlia Alshanetsky <iliaa@php.net>2007-05-07 18:40:33 +0000
committerIlia Alshanetsky <iliaa@php.net>2007-05-07 18:40:33 +0000
commit146a60071192cff25737d4d360f5118b8cf90882 (patch)
tree436be51ec4da84c5917985ac724327d84f8d258e /run-tests.php
parent1f6554512136708a3500f740df8593d368afccd8 (diff)
downloadphp-git-146a60071192cff25737d4d360f5118b8cf90882.tar.gz
Added support for --GZIP_POST-- and --DEFLATE_POST-- that allows emulation
of compressed POST input
Diffstat (limited to 'run-tests.php')
-rwxr-xr-xrun-tests.php9
1 files changed, 9 insertions, 0 deletions
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);