Check the headers for the transfer-encoding for chunked. Props santosj. see #4779

git-svn-id: https://develop.svn.wordpress.org/trunk@8578 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Ryan Boren 2008-08-06 21:57:25 +00:00
parent 0ca7018899
commit eb3daa5799
1 changed files with 1 additions and 1 deletions

View File

@ -797,7 +797,7 @@ class WP_Http_ExtHTTP {
list($theHeaders, $theBody) = explode("\r\n\r\n", $strResponse, 2);
$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);
$theResponse = array();