From e6971c04f191f2f56d343ccc97fc9740c07383eb Mon Sep 17 00:00:00 2001 From: ryan Date: Wed, 6 Aug 2008 21:57:25 +0000 Subject: [PATCH] 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 --- wp-includes/http.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/wp-includes/http.php b/wp-includes/http.php index 1a4b408036..c64d701083 100644 --- a/wp-includes/http.php +++ b/wp-includes/http.php @@ -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();