diff options
Diffstat (limited to 'run-tests.php')
| -rwxr-xr-x | run-tests.php | 9 |
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); |
