ID:               43721
 Updated by:       [EMAIL PROTECTED]
 Reported By:      phpbugs at thequod dot de
-Status:           Open
+Status:           Bogus
 Bug Type:         URL related
 Operating System: Ubuntu Linux
 PHP Version:      5.2.5
 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

That's expected, because unless a protocol is specified, it assumes 
file://


Previous Comments:
------------------------------------------------------------------------

[2007-12-31 18:10:32] phpbugs at thequod dot de

Description:
------------
parse_url does not parse "protocol relative" URLs correctly.

"protocol relative" URLs start with to slashes, leaving the "proto:" 
part out.

parse_url should parse them like a "http://"; url, but leave 
the "protocol" key unset, as far as I can see.

See RFC3986.

Reproduce code:
---------------
$ php -r '$p = parse_url("//example.com/bar"); var_dump($p);'


Expected result:
----------------
array(2) {
  ["host"]=>
  string(11) "example.com"
  ["path"]=>
  string(17) "/bar"
}


Actual result:
--------------
array(1) {
  ["path"]=>
  string(17) "//example.com/bar"
}



------------------------------------------------------------------------


-- 
Edit this bug report at http://bugs.php.net/?id=43721&edit=1

Reply via email to