From: mail at bjoern-kahl dot de Operating system: Linux 2.6.x (Debian Sarge, x86) PHP version: 5.1.6 PHP Bug Type: Streams related Bug description: mixed-case URL breaks url-wrappers (breaks RFC-3986 (STD-66))
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 bug report at http://bugs.php.net/?id=38661&edit=1 -- Try a CVS snapshot (PHP 4.4): http://bugs.php.net/fix.php?id=38661&r=trysnapshot44 Try a CVS snapshot (PHP 5.2): http://bugs.php.net/fix.php?id=38661&r=trysnapshot52 Try a CVS snapshot (PHP 6.0): http://bugs.php.net/fix.php?id=38661&r=trysnapshot60 Fixed in CVS: http://bugs.php.net/fix.php?id=38661&r=fixedcvs Fixed in release: http://bugs.php.net/fix.php?id=38661&r=alreadyfixed Need backtrace: http://bugs.php.net/fix.php?id=38661&r=needtrace Need Reproduce Script: http://bugs.php.net/fix.php?id=38661&r=needscript Try newer version: http://bugs.php.net/fix.php?id=38661&r=oldversion Not developer issue: http://bugs.php.net/fix.php?id=38661&r=support Expected behavior: http://bugs.php.net/fix.php?id=38661&r=notwrong Not enough info: http://bugs.php.net/fix.php?id=38661&r=notenoughinfo Submitted twice: http://bugs.php.net/fix.php?id=38661&r=submittedtwice register_globals: http://bugs.php.net/fix.php?id=38661&r=globals PHP 3 support discontinued: http://bugs.php.net/fix.php?id=38661&r=php3 Daylight Savings: http://bugs.php.net/fix.php?id=38661&r=dst IIS Stability: http://bugs.php.net/fix.php?id=38661&r=isapi Install GNU Sed: http://bugs.php.net/fix.php?id=38661&r=gnused Floating point limitations: http://bugs.php.net/fix.php?id=38661&r=float No Zend Extensions: http://bugs.php.net/fix.php?id=38661&r=nozend MySQL Configuration Error: http://bugs.php.net/fix.php?id=38661&r=mysqlcfg