|  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #32813 parse_url does not parse 'scheme:' correctly.
Submitted: 2005-04-24 22:30 UTC Modified: 2005-04-26 01:50 UTC
From: mpb dot mail at gmail dot com Assigned:
Status: Closed Package: *URL Functions
PHP Version: 4.*, 5.* OS: FreeBSD and Linux
Private report: No CVE-ID:
 [2005-04-24 22:30 UTC] mpb dot mail at gmail dot com
parse_url does not parse 'scheme:' correctly.


5. BNF for specific URL schemes


genericurl     = scheme ":" schemepart


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'.


Reproduce code:
var_dump (parse_url ('scheme:'));

Expected result:
array(1) {
  string(6) "scheme"

Actual result:
array(1) {
  string(6) "scheme"


Add a Patch

Pull Requests

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
 [2005-04-26 01:50 UTC]
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
Thank you for the report, and for helping us make PHP better.

PHP Copyright © 2001-2015 The PHP Group
All rights reserved.
Last updated: Tue Oct 13 07:01:43 2015 UTC