Bug #52803 [Opn->Bgs]: parse_url can't handle urls without a scheme.
| From: | scottmac@php.net | Date: | Thu, 09 Sep 2010 16:05:22 +0000 |
| Subject: | Bug #52803 [Opn->Bgs]: parse_url can't handle urls without a scheme. | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-154214@lists.php.net to get a copy of this message | ||
Edit report at http://bugs.php.net/bug.php?id=52803&edit=1
ID: 52803
Updated by: scottmac@php.net
Reported by: leif at flattr dot com
Summary: parse_url can't handle urls without a scheme.
-Status: Open
+Status: Bogus
Type: Bug
Package: *General Issues
Operating System: osx and debian linux
PHP Version: 5.3.3
Block user comment: N
New Comment:
The function is designed to work with a fully qualified URL, does the
manual
suggest otherwise?
Previous Comments:
------------------------------------------------------------------------
[2010-09-09 18:02:23] leif at flattr dot com
Description:
------------
parse_url will falsely use the hostname as path if url doesn't include
the scheme part.
Test script:
---------------
php > echo var_dump(parse_url('hejhopp.com/'));
Expected result:
----------------
array(1) {
["host"]=>
string(11) "hejhopp.com"
["path"]=>
string(1) "/"
}
Actual result:
--------------
array(1) {
["path"]=>
string(12) "hejhopp.com/"
}
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/bug.php?id=52803&edit=1