From: marques at displague dot com
Operating system:
PHP version: 5.2.9
PHP Bug Type: HTTP related
Bug description: file_get_contents does not decode chunk encoded data
Description:
------------
file_get_contents() does not decode HTTP content sent with
"Transfer-Encoding: chunked". This is probably also true for fopen() and
other HTTP stream handlers in PHP.
RFC2616 section 3.6.1:
All HTTP/1.1 applications MUST be able to receive and decode the
"chunked" transfer-coding, and MUST ignore chunk-extension extensions
they do not understand.
Reproduce code:
---------------
echo file_get_contents('somechunkedurl.html');
Expected result:
----------------
This is the data in the first chunk and this is the second one
Actual result:
--------------
23
This is the data in the first chunk
1A
and this is the second one
0
--
Edit bug report at http://bugs.php.net/?id=47759&edit=1
--
Try a CVS snapshot (PHP 5.2):
http://bugs.php.net/fix.php?id=47759&r=trysnapshot52
Try a CVS snapshot (PHP 5.3):
http://bugs.php.net/fix.php?id=47759&r=trysnapshot53
Try a CVS snapshot (PHP 6.0):
http://bugs.php.net/fix.php?id=47759&r=trysnapshot60
Fixed in CVS:
http://bugs.php.net/fix.php?id=47759&r=fixedcvs
Fixed in CVS and need be documented:
http://bugs.php.net/fix.php?id=47759&r=needdocs
Fixed in release:
http://bugs.php.net/fix.php?id=47759&r=alreadyfixed
Need backtrace:
http://bugs.php.net/fix.php?id=47759&r=needtrace
Need Reproduce Script:
http://bugs.php.net/fix.php?id=47759&r=needscript
Try newer version:
http://bugs.php.net/fix.php?id=47759&r=oldversion
Not developer issue:
http://bugs.php.net/fix.php?id=47759&r=support
Expected behavior:
http://bugs.php.net/fix.php?id=47759&r=notwrong
Not enough info:
http://bugs.php.net/fix.php?id=47759&r=notenoughinfo
Submitted twice:
http://bugs.php.net/fix.php?id=47759&r=submittedtwice
register_globals:
http://bugs.php.net/fix.php?id=47759&r=globals
PHP 4 support discontinued: http://bugs.php.net/fix.php?id=47759&r=php4
Daylight Savings: http://bugs.php.net/fix.php?id=47759&r=dst
IIS Stability:
http://bugs.php.net/fix.php?id=47759&r=isapi
Install GNU Sed:
http://bugs.php.net/fix.php?id=47759&r=gnused
Floating point limitations:
http://bugs.php.net/fix.php?id=47759&r=float
No Zend Extensions:
http://bugs.php.net/fix.php?id=47759&r=nozend
MySQL Configuration Error:
http://bugs.php.net/fix.php?id=47759&r=mysqlcfg