diff options
| author | Rasmus Lerdorf <rasmus@php.net> | 2006-02-10 07:41:59 +0000 |
|---|---|---|
| committer | Rasmus Lerdorf <rasmus@php.net> | 2006-02-10 07:41:59 +0000 |
| commit | a5883cc89c53df8e14eddba321986b300a2923c5 (patch) | |
| tree | 129351d5997baa492aaa24ba1b8e8f80f0bf872a /ext/session/session.c | |
| parent | 277789fb305c345bb3553ebd640d17a197e469d9 (diff) | |
| download | php-git-a5883cc89c53df8e14eddba321986b300a2923c5.tar.gz | |
(Missing patch from the PHP 4 tree that got lost in the shuffle)
See: http://cvs.php.net/viewcvs.cgi/php-src/ext/session/session.c?r1=1.336.2.39&r2=1.336.2.40
- fix logic. if the client already sent us the cookie, we don't
need to send it again. if the id has been changed, we need to
update the client side.
Diffstat (limited to 'ext/session/session.c')
| -rw-r--r-- | ext/session/session.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/ext/session/session.c b/ext/session/session.c index 8fb5e70d9e..35c1d21c45 100644 --- a/ext/session/session.c +++ b/ext/session/session.c @@ -1090,8 +1090,9 @@ static void php_session_reset_id(TSRMLS_D) { int module_number = PS(module_number); - if (PS(use_cookies)) { + if (PS(use_cookies) && PS(send_cookie)) { php_session_send_cookie(TSRMLS_C); + PS(send_cookie) = 0; } /* if the SID constant exists, destroy it. */ @@ -1487,6 +1488,7 @@ PHP_FUNCTION(session_regenerate_id) PS(id) = PS(mod)->s_create_sid(&PS(mod_data), NULL TSRMLS_CC); + PS(send_cookie) = 1; php_session_reset_id(TSRMLS_C); RETURN_TRUE; |
