#33138 [Opn->Bgs]: parse_url() wrongly handles relative URIs with ':'
| From: | iliaa@php.net | Date: | Wed, 25 May 2005 15:10:32 +0000 |
| Subject: | #33138 [Opn->Bgs]: parse_url() wrongly handles relative URIs with ':' | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-79488@lists.php.net to get a copy of this message | ||
ID: 33138
Updated by: iliaa@php.net
Reported By: moriyoshi@php.net
-Status: Open
+Status: Bogus
Bug Type: URL related
Operating System: Irrelevant
PHP Version: 4.3.11
New Comment:
Thank you for taking the time to write to us, but this is not
a bug. Please double-check the documentation available at
http://www.php.net/manual/ and the instructions on how to
report
a bug at http://bugs.php.net/how-to-report.php
A URL without a schema default to a local file, a locale file cannot
have GET parameters. Hence the error, there is no bug here.
Previous Comments:
------------------------------------------------------------------------
[2005-05-25 15:34:11] moriyoshi@php.net
Description:
------------
parse_url() cannot handle relative URIs (ones without
schemes) that contains ':' within the queries.
Reproduce code:
---------------
var_dump(parse_url('/a/b/c'));
var_dump(parse_url('/a/b/c?d:'));
var_dump(parse_url('/a/b/c?d:e'));
Expected result:
----------------
array(1) {
["path"]=>
string(6) "/a/b/c"
}
array(2) {
["path"]=>
string(6) "/a/b/c"
["query"]=>
string(6) "d:"
}
array(2) {
["path"]=>
string(6) "/a/b/c"
["query"]=>
string(6) "d:e"
}
Actual result:
--------------
array(1) {
["path"]=>
string(6) "/a/b/c"
}
Warning: parse_url(/a/b/c?d:): Unable to parse url in
Command line code on line 2
bool(false)
array(2) {
["scheme"]=>
string(8) "/a/b/c?d"
["path"]=>
string(1) "e"
}
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/?id=33138&edit=1