#38661 [Asn->Csd]: mixed-case URL breaks url-wrappers (breaks RFC-3986 (STD-66))
| From: | iliaa@php.net | Date: | Sun, 03 Sep 2006 16:33:20 +0000 |
| Subject: | #38661 [Asn->Csd]: mixed-case URL breaks url-wrappers (breaks RFC-3986 (STD-66)) | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-101672@lists.php.net to get a copy of this message | ||
ID: 38661
Updated by: iliaa@php.net
Reported By: mail at bjoern-kahl dot de
-Status: Assigned
+Status: Closed
Bug Type: Streams related
Operating System: Linux 2.6.x (Debian Sarge, x86)
PHP Version: 5.1.6
Assigned To: pollita
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:
------------------------------------------------------------------------
[2006-09-01 12:58:58] tony2001@php.net
Assigned to the maintainer.
------------------------------------------------------------------------
[2006-08-30 20:58:57] 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
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/?id=38661&edit=1