From a27e51fd4e9121f962821d0f7bd1960fce0a0fd5 Mon Sep 17 00:00:00 2001 From: Yasuo Ohgaki Date: Wed, 22 Jan 2014 13:40:58 +0900 Subject: [PATCH] Re-fixed bug #66469 --- ext/session/session.c | 4 +--- ext/session/tests/bug60634.phpt | 3 +-- ext/session/tests/bug60634_error_1.phpt | 3 +-- ext/session/tests/bug60634_error_2.phpt | 7 +++++-- ext/session/tests/bug60634_error_3.phpt | 3 +-- ext/session/tests/bug60634_error_4.phpt | 7 +++++-- 6 files changed, 14 insertions(+), 13 deletions(-) diff --git a/ext/session/session.c b/ext/session/session.c index 5b03d6362e..d6d5da2d0c 100644 --- a/ext/session/session.c +++ b/ext/session/session.c @@ -1248,9 +1248,7 @@ static void php_session_send_cookie(TSRMLS_D) /* {{{ */ smart_str_0(&ncookie); - /* 'replace' must be 0 here, else a previous Set-Cookie - header, probably sent with setcookie() will be replaced! */ - sapi_add_header_ex(ncookie.c, ncookie.len, 0, 0 TSRMLS_CC); + sapi_add_header_ex(ncookie.c, ncookie.len, 0, 1 TSRMLS_CC); } /* }}} */ diff --git a/ext/session/tests/bug60634.phpt b/ext/session/tests/bug60634.phpt index 2ec0c26c13..69f3db4faa 100644 --- a/ext/session/tests/bug60634.phpt +++ b/ext/session/tests/bug60634.phpt @@ -1,7 +1,5 @@ --TEST-- Bug #60634 (Segmentation fault when trying to die() in SessionHandler::write()) ---XFAIL-- -Long term low priority bug, working on it --INI-- session.save_path= session.name=PHPSESSID @@ -44,3 +42,4 @@ echo "um, hi\n"; ?> --EXPECTF-- write: goodbye cruel world +close: goodbye cruel world \ No newline at end of file diff --git a/ext/session/tests/bug60634_error_1.phpt b/ext/session/tests/bug60634_error_1.phpt index 3b6e394eed..e41592f18d 100644 --- a/ext/session/tests/bug60634_error_1.phpt +++ b/ext/session/tests/bug60634_error_1.phpt @@ -1,7 +1,5 @@ --TEST-- Bug #60634 (Segmentation fault when trying to die() in SessionHandler::write()) - fatal error in write during exec ---XFAIL-- -Long term low priority bug, working on it --INI-- session.save_path= session.name=PHPSESSID @@ -47,3 +45,4 @@ echo "um, hi\n"; write: goodbye cruel world Fatal error: Call to undefined function undefined_function() in %s on line %d +close: goodbye cruel world diff --git a/ext/session/tests/bug60634_error_2.phpt b/ext/session/tests/bug60634_error_2.phpt index 265fb303f7..8ab0242b62 100644 --- a/ext/session/tests/bug60634_error_2.phpt +++ b/ext/session/tests/bug60634_error_2.phpt @@ -1,7 +1,5 @@ --TEST-- Bug #60634 (Segmentation fault when trying to die() in SessionHandler::write()) - exception in write during exec ---XFAIL-- -Long term low priority bug, working on it --INI-- session.save_path= session.name=PHPSESSID @@ -47,3 +45,8 @@ echo "um, hi\n"; write: goodbye cruel world Fatal error: Uncaught exception 'Exception' in %s +Stack trace: +#0 [internal function]: write('%s', '') +#1 %s/ext/session/tests/bug60634_error_2.php(32): session_write_close() +#2 {main} + thrown in %s/ext/session/tests/bug60634_error_2.php on line 19 \ No newline at end of file diff --git a/ext/session/tests/bug60634_error_3.phpt b/ext/session/tests/bug60634_error_3.phpt index b2004d68bc..4a508a4d8f 100644 --- a/ext/session/tests/bug60634_error_3.phpt +++ b/ext/session/tests/bug60634_error_3.phpt @@ -1,7 +1,5 @@ --TEST-- Bug #60634 (Segmentation fault when trying to die() in SessionHandler::write()) - fatal error in write after exec ---XFAIL-- -Long term low priority bug, working on it --INI-- session.save_path= session.name=PHPSESSID @@ -46,3 +44,4 @@ session_start(); write: goodbye cruel world Fatal error: Call to undefined function undefined_function() in %s on line %d +close: goodbye cruel world diff --git a/ext/session/tests/bug60634_error_4.phpt b/ext/session/tests/bug60634_error_4.phpt index 60bc0dcf54..d5e81b8abf 100644 --- a/ext/session/tests/bug60634_error_4.phpt +++ b/ext/session/tests/bug60634_error_4.phpt @@ -1,7 +1,5 @@ --TEST-- Bug #60634 (Segmentation fault when trying to die() in SessionHandler::write()) - exception in write after exec ---XFAIL-- -Long term low priority bug, working on it --INI-- session.save_path= session.name=PHPSESSID @@ -46,3 +44,8 @@ session_start(); write: goodbye cruel world Fatal error: Uncaught exception 'Exception' in %s +Stack trace: +#0 [internal function]: write('%s', '') +#1 {main} + thrown in %s/ext/session/tests/bug60634_error_4.php on line 20 +close: goodbye cruel world \ No newline at end of file -- 2.40.0