From 5b230a45afb9bb825ba148e699bdcbfc57957fb4 Mon Sep 17 00:00:00 2001 From: Andreas Gohr Date: Fri, 2 Aug 2013 13:44:33 +0200 Subject: HTTPClient don't pull too much bytes when no content-length is given --- inc/HTTPClient.php | 2 ++ 1 file changed, 2 insertions(+) (limited to 'inc/HTTPClient.php') diff --git a/inc/HTTPClient.php b/inc/HTTPClient.php index 3964c8fbc..b2621bdbb 100644 --- a/inc/HTTPClient.php +++ b/inc/HTTPClient.php @@ -463,6 +463,8 @@ class HTTPClient { } $r_body = $this->_readData($socket, $length, 'response (content-length limited)', true); + }elseif( !isset($this->resp_headers['transfer-encoding']) && $this->max_bodysize && !$this->keep_alive){ + $r_body = $this->_readData($socket, $this->max_bodysize, 'response (content-length limited)', true); }else{ // read entire socket $r_size = 0; -- cgit v1.2.3