]> granicus.if.org Git - php/commitdiff
Because of the feature "don't try to send a cookie, if the sid
authorSascha Schumann <sas@php.net>
Wed, 13 Mar 2002 13:08:49 +0000 (13:08 +0000)
committerSascha Schumann <sas@php.net>
Wed, 13 Mar 2002 13:08:49 +0000 (13:08 +0000)
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

index f277d1c9f364c1666678c41c0b0d95db2c693e6c..9e0993dbf638926b18d7f9510958fb2925b5b533 100644 (file)
@@ -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));