felipe          Wed Mar 12 02:45:15 2008 UTC

  Modified files:              
    /php-src/ext/standard       url_scanner_ex.c 
    /php-src/ext/standard/tests/general_functions       bug44394.phpt 
                                                        bug44394_2.phpt 
  Log:
  MFB: Fixed bug #44394 (Last two bytes missing from output)
  
  
http://cvs.php.net/viewvc.cgi/php-src/ext/standard/url_scanner_ex.c?r1=1.108&r2=1.109&diff_format=u
Index: php-src/ext/standard/url_scanner_ex.c
diff -u php-src/ext/standard/url_scanner_ex.c:1.108 
php-src/ext/standard/url_scanner_ex.c:1.109
--- php-src/ext/standard/url_scanner_ex.c:1.108 Wed Oct 10 09:28:25 2007
+++ php-src/ext/standard/url_scanner_ex.c       Wed Mar 12 02:45:15 2008
@@ -18,7 +18,7 @@
   +----------------------------------------------------------------------+
 */
 
-/* $Id: url_scanner_ex.c,v 1.108 2007/10/10 09:28:25 jani Exp $ */
+/* $Id: url_scanner_ex.c,v 1.109 2008/03/12 02:45:15 felipe Exp $ */
 
 #include "php.h"
 
@@ -1007,7 +1007,7 @@
        size_t len;
 
        if (BG(url_adapt_state_ex).url_app.len != 0) {
-               *handled_output = url_adapt_ext(output, output_len, &len, 
(zend_bool) (mode & PHP_OUTPUT_HANDLER_END ? 1 : 0) TSRMLS_CC);
+               *handled_output = url_adapt_ext(output, output_len, &len, 
(zend_bool) (mode & (PHP_OUTPUT_HANDLER_END | PHP_OUTPUT_HANDLER_CONT) ? 1 : 0) 
TSRMLS_CC);
                if (sizeof(uint) < sizeof(size_t)) {
                        if (len > UINT_MAX)
                                len = UINT_MAX;
http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/general_functions/bug44394.phpt?r1=1.1&r2=1.2&diff_format=u
Index: php-src/ext/standard/tests/general_functions/bug44394.phpt
diff -u /dev/null php-src/ext/standard/tests/general_functions/bug44394.phpt:1.2
--- /dev/null   Wed Mar 12 02:45:15 2008
+++ php-src/ext/standard/tests/general_functions/bug44394.phpt  Wed Mar 12 
02:45:15 2008
@@ -0,0 +1,18 @@
+--TEST--
+Bug #44394     Last two bytes missing from output
+--FILE--
+<?php
+
+$string = "<a href='a?q=1'>asd</a>";
+
+output_add_rewrite_var('a', 'b');
+
+echo $string;
+
+ob_flush();
+
+ob_end_clean();
+
+?>
+--EXPECT--
+<a href='a?q=1&a=b'>asd</a>
http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/general_functions/bug44394_2.phpt?r1=1.1&r2=1.2&diff_format=u
Index: php-src/ext/standard/tests/general_functions/bug44394_2.phpt
diff -u /dev/null 
php-src/ext/standard/tests/general_functions/bug44394_2.phpt:1.2
--- /dev/null   Wed Mar 12 02:45:15 2008
+++ php-src/ext/standard/tests/general_functions/bug44394_2.phpt        Wed Mar 
12 02:45:15 2008
@@ -0,0 +1,24 @@
+--TEST--
+Bug #44394 (Last two bytes missing from output) with session.use_trans_id
+--FILE--
+<?php
+
+ini_set('session.use_trans_sid', 1);
+
+session_start();
+
+ob_start();
+
+$string = "<a href='a?q=1'>asd</a>";
+
+output_add_rewrite_var('a', 'b');
+
+echo $string;
+
+ob_flush();
+
+ob_end_clean();
+
+?>
+--EXPECTF--
+<a href='a?q=1&PHPSESSID=%s&a=b'>asd</a>



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

Reply via email to