|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2012-10-01 02:29 UTC] stas@php.net
-Status: Open
+Status: Closed
-Assigned To:
+Assigned To: stas
[2012-10-01 02:29 UTC] stas@php.net
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Sat Oct 25 22:00:01 2025 UTC |
Description: ------------ Password component is not matched if only the authority part is given... it does matches however if a scheme is provided with it. Due the difference between example 2 and 3 i'm not sure if a relative URI reference is supported or not. Test script: --------------- <?php var_dump(parse_url('http://user:pass@host')); var_dump(parse_url('//user:pass@host')); var_dump(parse_url('//user@host')); Expected result: ---------------- array(4) { ["scheme"]=> string(4) "http" ["host"]=> string(4) "host" ["user"]=> string(4) "user" ["pass"]=> string(4) "pass" } array(3) { ["host"]=> string(4) "host" ["user"]=> string(4) "user" ["pass"]=> string(4) "pass" } array(2) { ["host"]=> string(4) "host" ["user"]=> string(4) "user" } Actual result: -------------- array(4) { ["scheme"]=> string(4) "http" ["host"]=> string(4) "host" ["user"]=> string(4) "user" ["pass"]=> string(4) "pass" } array(1) { ["path"]=> string(16) "//user:pass@host" } array(2) { ["host"]=> string(4) "host" ["user"]=> string(4) "user" }