negotiation using the params parser would receive param keys without the
trailing asterisk, stripped by http\Params::PARSE_RFC5987
php_http_params_opts_default_get(&opts);
opts.input.str = estrndup(value_str, value_len);
opts.input.len = value_len;
+ opts.flags &= ~PHP_HTTP_PARAMS_RFC5987;
php_http_params_parse(¶ms, &opts TSRMLS_CC);
efree(opts.input.str);
return;
}
- eos = &Z_STRVAL_P(zv)[Z_STRLEN_P(zv)-1];
- if (*eos == '*') {
- *eos = '\0';
- *rfc5987 = 1;
- Z_STRLEN_P(zv) -= 1;
+ if (flags & PHP_HTTP_PARAMS_RFC5987) {
+ eos = &Z_STRVAL_P(zv)[Z_STRLEN_P(zv)-1];
+ if (*eos == '*') {
+ *eos = '\0';
+ *rfc5987 = 1;
+ Z_STRLEN_P(zv) -= 1;
+ }
}
if (flags & PHP_HTTP_PARAMS_URLENCODED) {
http\Params::DEF_PARAM_SEP,
http\Params::DEF_ARG_SEP,
http\Params::DEF_VAL_SEP,
- http\Params::PARSE_RFC5988 | http\Params::PARSE_ESCAPED
+ http\Params::PARSE_RFC5987 | http\Params::PARSE_RFC5988 | http\Params::PARSE_ESCAPED
);
var_dump($p->params);
var_dump((string)$p);