diff options
Diffstat (limited to 'inc/HTTPClient.php')
-rw-r--r-- | inc/HTTPClient.php | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/inc/HTTPClient.php b/inc/HTTPClient.php index ea9b42862..534ba220c 100644 --- a/inc/HTTPClient.php +++ b/inc/HTTPClient.php @@ -400,7 +400,8 @@ class HTTPClient { //read body (with chunked encoding if needed) $r_body = ''; - if(preg_match('/transfer\-(en)?coding:\s*chunked\r\n/i',$r_headers)){ + if((isset($this->resp_headers['transfer-encoding']) && $this->resp_headers['transfer-encoding'] == 'chunked') + || (isset($this->resp_headers['transfer-coding']) && $this->resp_headers['transfer-coding'] == 'chunked')){ do { $chunk_size = ''; do { |