sniper          Tue Apr  3 17:37:06 2001 EDT

  Modified files:              
    /php4/main  php_variables.c 
  Log:
  Cookies use ; as argument separator. 
  # And also the first step for the possible configure option 
  
  
Index: php4/main/php_variables.c
diff -u php4/main/php_variables.c:1.22 php4/main/php_variables.c:1.23
--- php4/main/php_variables.c:1.22      Tue Mar 27 03:34:51 2001
+++ php4/main/php_variables.c   Tue Apr  3 17:37:06 2001
@@ -217,7 +217,7 @@
 
 void php_treat_data(int arg, char *str, zval* destArray ELS_DC PLS_DC SLS_DC)
 {
-       char *res = NULL, *var, *val;
+       char *res = NULL, *var, *val, *separator = ";&";
        const char *c_var;
        pval *array_ptr;
        int free_buffer=0;
@@ -238,6 +238,7 @@
                                        PG(http_globals)[TRACK_VARS_GET] = array_ptr;
                                        break;
                                case PARSE_COOKIE:
+                                       separator=";";
                                        PG(http_globals)[TRACK_VARS_COOKIE] = 
array_ptr;
                                        break;
                        }
@@ -277,8 +278,8 @@
                return;
        }
 
-       var = php_strtok_r(res, ";&", &strtok_buf);
-
+       var = php_strtok_r(res, separator, &strtok_buf);
+       
        while (var) {
                val = strchr(var, '=');
                if (val) { /* have a value */
@@ -289,7 +290,7 @@
                        val_len = php_url_decode(val, strlen(val));
                        php_register_variable_safe(var, val, val_len, array_ptr ELS_CC 
PLS_CC);
                }
-               var = php_strtok_r(NULL, ";&", &strtok_buf);
+               var = php_strtok_r(NULL, separator, &strtok_buf);
        }
        if (free_buffer) {
                efree(res);



-- 
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]

Reply via email to