#32813 [Opn->Csd]: parse_url does not parse 'scheme:' correctly.

From: Date: Mon, 25 Apr 2005 23:50:48 +0000
Subject: #32813 [Opn->Csd]: parse_url does not parse 'scheme:' correctly.
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-78191@lists.php.net to get a copy of this message
ID: 32813 Updated by: iliaa@php.net Reported By: mpb dot mail at gmail dot com -Status: Open +Status: Closed Bug Type: *URL Functions Operating System: FreeBSD and Linux PHP Version: 4.*, 5.* New Comment: This bug has been fixed in CVS. Snapshots of the sources are packaged every three hours; this change will be in the next snapshot. You can grab the snapshot at http://snaps.php.net/. Thank you for the report, and for helping us make PHP better. Previous Comments: ------------------------------------------------------------------------ [2005-04-24 22:30:43] mpb dot mail at gmail dot com Description: ------------ parse_url does not parse 'scheme:' correctly. -------- From http://www.ietf.org/rfc/rfc1738.txt: 5. BNF for specific URL schemes [snip] genericurl = scheme ":" schemepart [snip] schemepart = *xchar | ip-schemepart -------- In other words, 'scheme:' is a complete and valid URL; the empty string is a valid schemepart. parse_url ('scheme:') claims that the *host* is 'scheme'. This is incorrect. The *scheme* is 'scheme'. Thanks! Reproduce code: --------------- var_dump (parse_url ('scheme:')); Expected result: ---------------- array(1) { ["scheme"]=> string(6) "scheme" } Actual result: -------------- array(1) { ["host"]=> string(6) "scheme" } ------------------------------------------------------------------------ -- Edit this bug report at http://bugs.php.net/?id=32813&edit=1

« previous php.bugs (#78191) next »