Bug #72686 [NEW]: zlib: url support is broken, that may be a good thing
| From: | ekobrin at akamai dot com | Date: | Wed, 27 Jul 2016 02:45:14 +0000 |
| Subject: | Bug #72686 [NEW]: zlib: url support is broken, that may be a good thing | ||
| Groups: | php.bugs | ||
| Request: | Send a blank email to php-bugs+get-202625@lists.php.net to get a copy of this message | ||
From: ekobrin at akamai dot com
Operating system:
PHP version: master-Git-2016-07-27 (Git)
Package: Streams related
Bug Type: Bug
Bug description:zlib: url support is broken, that may be a good thing
Description:
------------
Line 1772 of streams.c is: '} else if (n == 5 && strncasecmp(path,
"zlib:", 5) == 0) '
This is a bug.
If path starts with "zlib:" then n will be 4, not 5.
Since this branch can never be entered, and it only exists to support a
deprecated stream type, I suggest simple deleting the entire "else"
clause.
Test script:
---------------
readfile("zlib:file.gz");
Expected result:
----------------
gzip content is extracted, warning (Use of "zlib:" wrapper is
deprecated; please use "compress.zlib://" instead) is printed
Actual result:
--------------
Warning (failed to open stream: No such file or directory) is printed
--
Edit bug report at https://bugs.php.net/bug.php?id=72686&edit=1
--
Try a snapshot (PHP 5.4): https://bugs.php.net/fix.php?id=72686&r=trysnapshot54
Try a snapshot (PHP 5.5): https://bugs.php.net/fix.php?id=72686&r=trysnapshot55
Try a snapshot (trunk): https://bugs.php.net/fix.php?id=72686&r=trysnapshottrunk
Fixed in SVN: https://bugs.php.net/fix.php?id=72686&r=fixed
Fixed in release: https://bugs.php.net/fix.php?id=72686&r=alreadyfixed
Need backtrace: https://bugs.php.net/fix.php?id=72686&r=needtrace
Need Reproduce Script: https://bugs.php.net/fix.php?id=72686&r=needscript
Try newer version: https://bugs.php.net/fix.php?id=72686&r=oldversion
Not developer issue: https://bugs.php.net/fix.php?id=72686&r=support
Expected behavior: https://bugs.php.net/fix.php?id=72686&r=notwrong
Not enough info: https://bugs.php.net/fix.php?id=72686&r=notenoughinfo
Submitted twice: https://bugs.php.net/fix.php?id=72686&r=submittedtwice
register_globals: https://bugs.php.net/fix.php?id=72686&r=globals
PHP 4 support discontinued: https://bugs.php.net/fix.php?id=72686&r=php4
Daylight Savings: https://bugs.php.net/fix.php?id=72686&r=dst
IIS Stability: https://bugs.php.net/fix.php?id=72686&r=isapi
Install GNU Sed: https://bugs.php.net/fix.php?id=72686&r=gnused
Floating point limitations: https://bugs.php.net/fix.php?id=72686&r=float
No Zend Extensions: https://bugs.php.net/fix.php?id=72686&r=nozend
MySQL Configuration Error: https://bugs.php.net/fix.php?id=72686&r=mysqlcfg