summaryrefslogtreecommitdiff
path: root/main/php_variables.c
diff options
context:
space:
mode:
authorfoobar <sniper@php.net>2001-04-04 00:37:06 +0000
committerfoobar <sniper@php.net>2001-04-04 00:37:06 +0000
commit460293fbdc2a868df8b117ff5a64b579a4867b4e (patch)
tree85546535ed3ef80907bdbf59d8f8b8d8c0f2b7e8 /main/php_variables.c
parent679b914dc0ebd62618bf2d48dcd4770a69fc5f00 (diff)
downloadphp-git-460293fbdc2a868df8b117ff5a64b579a4867b4e.tar.gz
Cookies use ; as argument separator.
# And also the first step for the possible configure option
Diffstat (limited to 'main/php_variables.c')
-rw-r--r--main/php_variables.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/main/php_variables.c b/main/php_variables.c
index 298e56ec40..1d2ff0c21f 100644
--- a/main/php_variables.c
+++ b/main/php_variables.c
@@ -217,7 +217,7 @@ SAPI_POST_HANDLER_FUNC(php_std_post_handler)
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 @@ void php_treat_data(int arg, char *str, zval* destArray ELS_DC PLS_DC SLS_DC)
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 @@ void php_treat_data(int arg, char *str, zval* destArray ELS_DC PLS_DC SLS_DC)
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 @@ void php_treat_data(int arg, char *str, zval* destArray ELS_DC PLS_DC SLS_DC)
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);