From 1af8b3f8836bd8fb997ebfead82cbf21d33ed916 Mon Sep 17 00:00:00 2001 From: zoe slattery Date: Tue, 15 May 2012 11:05:20 +0100 Subject: Change impl of GZIP_POST, DEFLATE_POST. See #62021 --- ext/soap/tests/server019.phpt | 4 +--- ext/soap/tests/server020.phpt | 4 +--- run-tests.php | 40 ++++++++++++++++++++++++++++++---------- 3 files changed, 32 insertions(+), 16 deletions(-) diff --git a/ext/soap/tests/server019.phpt b/ext/soap/tests/server019.phpt index defdac5b9b..d36cff0887 100644 --- a/ext/soap/tests/server019.phpt +++ b/ext/soap/tests/server019.phpt @@ -8,7 +8,7 @@ SOAP Server 19: compressed request (gzip) ?> --INI-- precision=14 ---POST-- +--GZIP_POST-- ---GZIP_POST-- -1 --FILE-- --INI-- precision=14 ---POST-- +--DEFLATE_POST-- ---DEFLATE_POST-- -1 --FILE-- &1 < \"$tmp_post\""; + } else if (array_key_exists('GZIP_POST', $section_text) && !empty($section_text['GZIP_POST'])) { + + $post = trim($section_text['GZIP_POST']); + $post = gzencode($post, 9, FORCE_GZIP); + $env['HTTP_CONTENT_ENCODING'] = 'gzip'; + + save_text($tmp_post, $post); + $content_length = strlen($post); + + $env['REQUEST_METHOD'] = 'POST'; + $env['CONTENT_TYPE'] = 'application/x-www-form-urlencoded'; + $env['CONTENT_LENGTH'] = $content_length; + + $cmd = "$php $pass_options $ini_settings -f \"$test_file\" 2>&1 < \"$tmp_post\""; + + } else if (array_key_exists('DEFLATE_POST', $section_text) && !empty($section_text['DEFLATE_POST'])) { + $post = trim($section_text['DEFLATE_POST']); + $post = gzcompress($post, 9); + $env['HTTP_CONTENT_ENCODING'] = 'deflate'; + save_text($tmp_post, $post); + $content_length = strlen($post); + + $env['REQUEST_METHOD'] = 'POST'; + $env['CONTENT_TYPE'] = 'application/x-www-form-urlencoded'; + $env['CONTENT_LENGTH'] = $content_length; + + $cmd = "$php $pass_options $ini_settings -f \"$test_file\" 2>&1 < \"$tmp_post\""; + + } else { $env['REQUEST_METHOD'] = 'GET'; -- cgit v1.2.1