summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ext/standard/url.c9
1 files changed, 7 insertions, 2 deletions
diff --git a/ext/standard/url.c b/ext/standard/url.c
index 044bd830ce..9b75a03f41 100644
--- a/ext/standard/url.c
+++ b/ext/standard/url.c
@@ -94,10 +94,15 @@ PHPAPI php_url *php_url_parse(char *str)
ue = s + length;
/* parse scheme */
- if ((e = strchr(s, ':')) && *(e+1) == '/' && *(e+2) == '/' && (e-s)) {
+ if ((e = strchr(s, ':')) && *(e+1) == '/' && (e-s)) {
ret->scheme = estrndup(s, (e-s));
php_replace_controlchars(ret->scheme);
- s = e + 3;
+
+ if (*(e+2) == '/') {
+ s = e + 3;
+ } else {
+ s = e + 2;
+ }
} else if (e) { /* no scheme, look for port */
p = e + 1;
pp = p;