]> granicus.if.org Git - php/commitdiff
MFH: add note why replace is 0, so that I don't wonder again in 2 months
authorMichael Wallner <mike@php.net>
Wed, 12 Jul 2006 15:28:44 +0000 (15:28 +0000)
committerMichael Wallner <mike@php.net>
Wed, 12 Jul 2006 15:28:44 +0000 (15:28 +0000)
     why session_regenerate_id() sends the session cookie twice

ext/session/session.c

index 9feb7784d0d1ecd43154b27b239e39748ac79863..c3a87ed3230d4b42c0e6d55e5267fe45f1411e7e 100644 (file)
@@ -1053,6 +1053,8 @@ 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);
 }