Check the headers for the transfer-encoding for chunked. Props santosj. see #4779
git-svn-id: http://svn.automattic.com/wordpress/trunk@8578 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
ce1404129e
commit
e6971c04f1
|
@ -797,7 +797,7 @@ class WP_Http_ExtHTTP {
|
||||||
list($theHeaders, $theBody) = explode("\r\n\r\n", $strResponse, 2);
|
list($theHeaders, $theBody) = explode("\r\n\r\n", $strResponse, 2);
|
||||||
$theHeaders = WP_Http::processHeaders($theHeaders);
|
$theHeaders = WP_Http::processHeaders($theHeaders);
|
||||||
|
|
||||||
if ( !empty($theBody) )
|
if ( ! empty( $theBody ) && isset( $theHeaders['headers']['transfer-encoding'] ) && 'chunked' == $theHeaders['headers']['transfer-encoding'] )
|
||||||
$theBody = http_chunked_decode($theBody);
|
$theBody = http_chunked_decode($theBody);
|
||||||
|
|
||||||
$theResponse = array();
|
$theResponse = array();
|
||||||
|
|
Loading…
Reference in New Issue