summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorYasuo Ohgaki <yohgaki@php.net>2014-01-22 13:40:58 +0900
committerYasuo Ohgaki <yohgaki@php.net>2014-01-22 13:40:58 +0900
commita27e51fd4e9121f962821d0f7bd1960fce0a0fd5 (patch)
tree62378007216e4186fb38eeccb49c16fbe8ceea21
parent1bc16fbfcdba428d42bc6d1d5cd84ad88a601c21 (diff)
downloadphp-git-a27e51fd4e9121f962821d0f7bd1960fce0a0fd5.tar.gz
Re-fixed bug #66469
-rw-r--r--ext/session/session.c4
-rw-r--r--ext/session/tests/bug60634.phpt3
-rw-r--r--ext/session/tests/bug60634_error_1.phpt3
-rw-r--r--ext/session/tests/bug60634_error_2.phpt7
-rw-r--r--ext/session/tests/bug60634_error_3.phpt3
-rw-r--r--ext/session/tests/bug60634_error_4.phpt7
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