summaryrefslogtreecommitdiff
path: root/ext/standard/url.c
diff options
context:
space:
mode:
Diffstat (limited to 'ext/standard/url.c')
-rw-r--r--ext/standard/url.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/ext/standard/url.c b/ext/standard/url.c
index d8271a18ed..16237e6599 100644
--- a/ext/standard/url.c
+++ b/ext/standard/url.c
@@ -181,6 +181,10 @@ PHPAPI php_url *php_url_parse_ex(char const *str, int length)
p = e + 1;
pp = p;
+ if (*s == '/' && *(s+1) == '/') { /* relative-scheme URL */
+ s += 2;
+ }
+
while (pp-p < 6 && isdigit(*pp)) {
pp++;
}
@@ -201,10 +205,6 @@ PHPAPI php_url *php_url_parse_ex(char const *str, int length)
STR_FREE(ret->scheme);
efree(ret);
return NULL;
- } else if (*s == '/' && *(s+1) == '/') { /* relative-scheme URL */
- s += 2;
- } else {
- goto just_path;
}
} else if (*s == '/' && *(s+1) == '/') { /* relative-scheme URL */
s += 2;