summaryrefslogtreecommitdiff
path: root/ext/session/session.c
diff options
context:
space:
mode:
authorSascha Schumann <sas@php.net>2002-03-13 13:08:49 +0000
committerSascha Schumann <sas@php.net>2002-03-13 13:08:49 +0000
commit730800a96d52cac467dd5fc459e279f199985e9d (patch)
tree260898c21e0c2433e64564b21bb994c2ff3b65e6 /ext/session/session.c
parentf02d3f4518d928ffc9421804c3919ae345930908 (diff)
downloadphp-git-730800a96d52cac467dd5fc459e279f199985e9d.tar.gz
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
Diffstat (limited to 'ext/session/session.c')
-rw-r--r--ext/session/session.c5
1 files 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));