iliaa Wed Feb 11 12:00:49 2004 EDT
Added files:
/php-src/ext/session/tests bug26862.phpt
Modified files:
/php-src/ext/standard url_scanner_ex.c url_scanner_ex.re
Log:
Fixed bug #26862 (ob_flush() followed by output_reset_rewrite_vars() may
result in data loss).
http://cvs.php.net/diff.php/php-src/ext/standard/url_scanner_ex.c?r1=1.82&r2=1.83&ty=u
Index: php-src/ext/standard/url_scanner_ex.c
diff -u php-src/ext/standard/url_scanner_ex.c:1.82
php-src/ext/standard/url_scanner_ex.c:1.83
--- php-src/ext/standard/url_scanner_ex.c:1.82 Thu Jan 8 14:17:50 2004
+++ php-src/ext/standard/url_scanner_ex.c Wed Feb 11 12:00:47 2004
@@ -1,5 +1,5 @@
-/* Generated by re2c 0.5 on Thu Jan 8 20:25:46 2004 */
-#line 1 "/usr/src/web/php/php5/ext/standard/url_scanner_ex.re"
+/* Generated by re2c 0.5 on Wed Feb 11 11:58:10 2004 */
+#line 1 "/home/rei/php5/ext/standard/url_scanner_ex.re"
/*
+----------------------------------------------------------------------+
| PHP Version 5 |
@@ -918,7 +918,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/diff.php/php-src/ext/standard/url_scanner_ex.re?r1=1.70&r2=1.71&ty=u
Index: php-src/ext/standard/url_scanner_ex.re
diff -u php-src/ext/standard/url_scanner_ex.re:1.70
php-src/ext/standard/url_scanner_ex.re:1.71
--- php-src/ext/standard/url_scanner_ex.re:1.70 Thu Jan 8 12:32:52 2004
+++ php-src/ext/standard/url_scanner_ex.re Wed Feb 11 12:00:47 2004
@@ -417,7 +417,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/co.php/php-src/ext/session/tests/bug26862.phpt?r=1.1&p=1
Index: php-src/ext/session/tests/bug26862.phpt
+++ php-src/ext/session/tests/bug26862.phpt
--TEST--
Bug #26862 (ob_flush() before output_reset_rewrite_vars() results in data loss)
--SKIPIF--
<?php include('skipif.inc'); ?>
--INI--
register_globals=0
html_errors=0
--FILE--
<?php
session_start();
output_add_rewrite_var('var', 'value');
echo '<a href="file.php">link</a>';
ob_flush();
output_reset_rewrite_vars();
echo '<a href="file.php">link</a>';
?>
--EXPECT--
<a href="file.php?var=value">link</a><a href="file.php">link</a>
--
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php