From: jerome at rainstormconsulting dot com Operating system: Any PHP version: 5.2.3 PHP Bug Type: URL related Bug description: fopen url wrapper doesn't handle chunked encoding
Description: ------------ Opening a URL via fopen()/fread() does not work properly if Transfer- Encoding: chunked is used Reproduce code: --------------- <?php $fp = fopen('http://www.bluestatecoffee.com/blog/topics/blue-state-coffee-news/feed/rss2', 'r'); $data = fread($fp, 45); print htmlentities($data); Expected result: ---------------- <?xml version="1.0" encoding="UTF-8"?> Actual result: -------------- 29d0 <?xml version="1.0" encoding="UTF-8"?> -- Edit bug report at http://bugs.php.net/?id=42445&edit=1 -- Try a CVS snapshot (PHP 4.4): http://bugs.php.net/fix.php?id=42445&r=trysnapshot44 Try a CVS snapshot (PHP 5.2): http://bugs.php.net/fix.php?id=42445&r=trysnapshot52 Try a CVS snapshot (PHP 6.0): http://bugs.php.net/fix.php?id=42445&r=trysnapshot60 Fixed in CVS: http://bugs.php.net/fix.php?id=42445&r=fixedcvs Fixed in release: http://bugs.php.net/fix.php?id=42445&r=alreadyfixed Need backtrace: http://bugs.php.net/fix.php?id=42445&r=needtrace Need Reproduce Script: http://bugs.php.net/fix.php?id=42445&r=needscript Try newer version: http://bugs.php.net/fix.php?id=42445&r=oldversion Not developer issue: http://bugs.php.net/fix.php?id=42445&r=support Expected behavior: http://bugs.php.net/fix.php?id=42445&r=notwrong Not enough info: http://bugs.php.net/fix.php?id=42445&r=notenoughinfo Submitted twice: http://bugs.php.net/fix.php?id=42445&r=submittedtwice register_globals: http://bugs.php.net/fix.php?id=42445&r=globals PHP 3 support discontinued: http://bugs.php.net/fix.php?id=42445&r=php3 Daylight Savings: http://bugs.php.net/fix.php?id=42445&r=dst IIS Stability: http://bugs.php.net/fix.php?id=42445&r=isapi Install GNU Sed: http://bugs.php.net/fix.php?id=42445&r=gnused Floating point limitations: http://bugs.php.net/fix.php?id=42445&r=float No Zend Extensions: http://bugs.php.net/fix.php?id=42445&r=nozend MySQL Configuration Error: http://bugs.php.net/fix.php?id=42445&r=mysqlcfg