|  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #38661 mixed-case URL breaks url-wrappers (breaks RFC-3986 (STD-66))
Submitted: 2006-08-30 20:58 UTC Modified: 2006-09-03 16:33 UTC
Avg. Score:3.7 ± 0.9
Reproduced:3 of 3 (100.0%)
Same Version:1 (33.3%)
Same OS:2 (66.7%)
From: mail at bjoern-kahl dot de Assigned:
Status: Closed Package: Streams related
PHP Version: 5.1.6 OS: Linux 2.6.x (Debian Sarge, x86)
Private report: No CVE-ID: None
View Add Comment Developer Edit
Anyone can comment on a bug. Have a simpler test case? Does it work for you on a different platform? Let us know!
Just going to say 'Me too!'? Don't clutter the database with that please !
Your email address:
Solve the problem:
22 - 17 = ?
Subscribe to this entry?

 [2006-08-30 20:58 UTC] mail at bjoern-kahl dot de
The url wrapper support in php does not ignore case of the scheme part of URLs.

According to RFC-3986 (aka. STD-66), Sec. 3.1, the scheme in an URL is case-insensitive and therefore should be matched in a case-insensitive manner.


This problem is present in both, php-4.4.4 and php-5.1.6.

PHP compiled from source with ./configure  --disable-cgi --enable-cli --disable-ipv6 --disable-all --without-pear

Reproduce code:
This will not work:

echo file("hTtp://");

This works as expected:
echo file("");

Note the capital "T" in "hTtp://" in the first example.

Expected result:
First example should show the same behaviour as the second one. Both examples should complete without error.

Actual result:
First example returns:

Notice: file(): Unable to find the wrapper "hTtp" - did you forget to enable it when you configured PHP? in xxx on line 3

Warning: file(hTtp:// failed to open stream: No such file or directory in xxx- on line 3


Add a Patch

Pull Requests

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
 [2006-09-01 12:58 UTC]
Assigned to the maintainer.
 [2006-09-03 16:33 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-2024 The PHP Group
All rights reserved.
Last updated: Mon Jun 17 12:01:31 2024 UTC