php.net |  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
Votes:3
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 Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
If you reported this bug, you can edit this bug over here.
(description)
Block user comment
Status: Assign to:
Package:
Bug Type:
Summary:
From: mail at bjoern-kahl dot de
New email:
PHP Version: OS:

 

 [2006-08-30 20:58 UTC] mail at bjoern-kahl dot de
Description:
------------
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.

(See http://www.rfc-editor.org/rfc/std/std66.txt)

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:

<?
error_reporting(E_ALL);
echo file("hTtp://www.php.net");
?>


This works as expected:
<?
error_reporting(E_ALL);
echo file("http://www.php.net");
?>

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://www.php.net): failed to open stream: No such file or directory in xxx- on line 3



Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2006-09-01 12:58 UTC] tony2001@php.net
Assigned to the maintainer.
 [2006-09-03 16:33 UTC] iliaa@php.net
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.


 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Tue Dec 03 08:01:28 2024 UTC