com php-src: Revert "Fixed bug #64604": ext/standard/tests/url/bug64604.phpt ext/standard/url.c

From: Date: Fri, 25 Apr 2014 07:57:29 +0000
Subject: com php-src: Revert "Fixed bug #64604": ext/standard/tests/url/bug64604.phpt ext/standard/url.c
Groups: php.cvs 
Request: Send a blank email to php-cvs+get-77187@lists.php.net to get a copy of this message
Commit: da80c3b62fb6fe4835fb3d31953ceae918006af2 Author: Julien Pauli <jpauli@php.net> Fri, 25 Apr 2014 09:57:29 +0200 Parents: 8db1ba94e440a6bbb387b3a6b34d1d9235537e55 Branches: PHP-5.5.12 Link: http://git.php.net/?p=php-src.git;a=commitdiff;h=da80c3b62fb6fe4835fb3d31953ceae918006af2 Log: Revert "Fixed bug #64604" This reverts commit b05c088a3abf8e4c6fb6e40418423a9e2dd3d929. Bugs: https://bugs.php.net/64604 Changed paths: D ext/standard/tests/url/bug64604.phpt M ext/standard/url.c Diff: diff --git a/ext/standard/tests/url/bug64604.phpt b/ext/standard/tests/url/bug64604.phpt deleted file mode 100644 index bbc3cb9..0000000 --- a/ext/standard/tests/url/bug64604.phpt +++ /dev/null @@ -1,40 +0,0 @@ ---TEST-- -Bug #64604 parse_url is inconsistent with specified port ---FILE-- -<?php -var_dump(parse_url('//localhost/path')); -var_dump(parse_url('//localhost:80/path')); -var_dump(parse_url('//localhost:/path')); -var_dump(parse_url('http://localhost:80/path')); -?> ---EXPECT-- -array(2) { - ["host"]=> - string(9) "localhost" - ["path"]=> - string(5) "/path" -} -array(3) { - ["host"]=> - string(9) "localhost" - ["port"]=> - int(80) - ["path"]=> - string(5) "/path" -} -array(2) { - ["host"]=> - string(9) "localhost" - ["path"]=> - string(5) "/path" -} -array(4) { - ["scheme"]=> - string(4) "http" - ["host"]=> - string(9) "localhost" - ["port"]=> - int(80) - ["path"]=> - string(5) "/path" -} diff --git a/ext/standard/url.c b/ext/standard/url.c index 16237e6..d8271a1 100644 --- a/ext/standard/url.c +++ b/ext/standard/url.c @@ -181,10 +181,6 @@ 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++; } @@ -205,6 +201,10 @@ 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;

« previous php.cvs (#77187) next »