Bug #71646 [Opn]: parse_url fails to parse relative url with port-like string in url
Edit report at https://bugs.php.net/bug.php?id=71646&edit=1
ID: 71646
User updated by: jona at mode dot com
Reported by: jona at mode dot com
Summary: parse_url fails to parse relative url with port-like
string in url
Status: Open
Type: Bug
Package: URL related
Operating System: linux
PHP Version: 5.6.18
Block user comment: N
Private report: N
New Comment:
This bug is for a relative URL. Bug 70942 is a schema-less absolute URL.
Previous Comments:
------------------------------------------------------------------------
[2016-02-23 12:04:47] cmb@php.net
This appears to be a duplicate of bug #70942.
------------------------------------------------------------------------
[2016-02-22 18:28:30] jona at mode dot com
Description:
------------
When a relative URL without a scheme and port, but with a port-like string (e.g.
/example.com/foo:1234) is passed to parse_url(), it fails to parse the URL (returning false).
Test script:
---------------
var_dump(parse_url("/foo/bar:1"));
Expected result:
----------------
array(1) {
["path"]=>
string(10) "/foo/bar:1"
}
Actual result:
--------------
false
------------------------------------------------------------------------
--
Edit this bug report at https://bugs.php.net/bug.php?id=71646&edit=1
Thread (4 messages)