From 730800a96d52cac467dd5fc459e279f199985e9d Mon Sep 17 00:00:00 2001 From: Sascha Schumann Date: Wed, 13 Mar 2002 13:08:49 +0000 Subject: [PATCH] Because of the feature "don't try to send a cookie, if the sid was contained in get/post variables" (which I still am not convinced of completely), we need a separate variable which determines whether to define SID in the event that a cookie was not sent. Noticed by: Matt Allen --- ext/session/session.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/ext/session/session.c b/ext/session/session.c index f277d1c9f3..9e0993dbf6 100644 --- a/ext/session/session.c +++ b/ext/session/session.c @@ -833,6 +833,7 @@ PHPAPI void php_session_start(TSRMLS_D) zval **data; char *p; int send_cookie = 1; + int define_sid = 1; int module_number = PS(module_number); int nrand; int lensess; @@ -859,6 +860,7 @@ PHPAPI void php_session_start(TSRMLS_D) PPID2SID; PS(apply_trans_sid) = 0; send_cookie = 0; + define_sid = 0; } if (!PS(id) && @@ -930,8 +932,7 @@ PHPAPI void php_session_start(TSRMLS_D) } - /* define SID always, if the client did not send a cookie */ - if (send_cookie) { + if (define_sid) { smart_str var = {0}; smart_str_appends(&var, PS(session_name)); -- 2.50.1