cvs: php4 /main php_variables.c

From: Date: Wed, 04 Apr 2001 00:37:06 +0000
Subject: cvs: php4 /main php_variables.c
Groups: php.cvs 
Request: Send a blank email to php-cvs+get-4973@lists.php.net to get a copy of this message
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);

« previous php.cvs (#4973) next »