summaryrefslogtreecommitdiff
path: root/ext/standard/url.c
diff options
context:
space:
mode:
authorPierrick Charron <pierrick@php.net>2011-03-13 04:02:56 (GMT)
committerPierrick Charron <pierrick@php.net>2011-03-13 04:02:56 (GMT)
commit6e74d95f34c7d6352a91eff456d6a69a18953287 (patch)
tree3a299117e90cf22145ecd25d29c89fd4b24601f5 /ext/standard/url.c
parentd890ece3fc51989bf1de2a3e1e03c2b135534832 (diff)
downloadphp-6e74d95f34c7d6352a91eff456d6a69a18953287.tar.gz
Fixed bug #54180 (parse_url() incorrectly parses path when ? in fragment)
Diffstat (limited to 'ext/standard/url.c')
-rw-r--r--ext/standard/url.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/ext/standard/url.c b/ext/standard/url.c
index 29ebbb7..e516f15 100644
--- a/ext/standard/url.c
+++ b/ext/standard/url.c
@@ -316,6 +316,10 @@ PHPAPI php_url *php_url_parse_ex(char const *str, int length)
pp = strchr(s, '#');
if (pp && pp < p) {
+ if (pp - s) {
+ ret->path = estrndup(s, (pp-s));
+ php_replace_controlchars_ex(ret->path, (pp - s));
+ }
p = pp;
goto label_parse;
}