iliaa           Mon May  7 18:40:33 2007 UTC

  Modified files:              (Branch: PHP_5_2)
    /php-src    run-tests.php 
  Log:
  
  Added support for --GZIP_POST-- and --DEFLATE_POST-- that allows emulation
  of compressed POST input
  
  
http://cvs.php.net/viewvc.cgi/php-src/run-tests.php?r1=1.226.2.37.2.27&r2=1.226.2.37.2.28&diff_format=u
Index: php-src/run-tests.php
diff -u php-src/run-tests.php:1.226.2.37.2.27 
php-src/run-tests.php:1.226.2.37.2.28
--- php-src/run-tests.php:1.226.2.37.2.27       Wed May  2 15:41:06 2007
+++ php-src/run-tests.php       Mon May  7 18:40:33 2007
@@ -23,7 +23,7 @@
    +----------------------------------------------------------------------+
  */
 
-/* $Id: run-tests.php,v 1.226.2.37.2.27 2007/05/02 15:41:06 tony2001 Exp $ */
+/* $Id: run-tests.php,v 1.226.2.37.2.28 2007/05/07 18:40:33 iliaa Exp $ */
 
 /* Sanity check to ensure that pcre extension needed by this script is 
available.
  * In the event it is not, print a nice error message indicating that this 
script will
@@ -398,7 +398,7 @@
                                        $html_output = is_resource($html_file);
                                        break;
                                case '--version':
-                                       echo '$Revision: 1.226.2.37.2.27 
$'."\n";
+                                       echo '$Revision: 1.226.2.37.2.28 
$'."\n";
                                        exit(1);
                                default:
                                        echo "Illegal switch '$switch' 
specified!\n";
@@ -1328,6 +1328,15 @@
        } 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);
 

-- 
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to