summaryrefslogtreecommitdiff
path: root/inc/HTTPClient.php
diff options
context:
space:
mode:
authorAndreas Gohr <andi@splitbrain.org>2013-08-02 13:44:33 +0200
committerAndreas Gohr <andi@splitbrain.org>2013-08-02 21:50:16 +0200
commit5b230a45afb9bb825ba148e699bdcbfc57957fb4 (patch)
treea99659b2af3fcfde08dbbe2a0a6d194c81083494 /inc/HTTPClient.php
parent18ce55ed82c3241469c3b29caef3a5c21c501d68 (diff)
downloadrpg-5b230a45afb9bb825ba148e699bdcbfc57957fb4.tar.gz
rpg-5b230a45afb9bb825ba148e699bdcbfc57957fb4.tar.bz2
HTTPClient don't pull too much bytes when no content-length is given
Diffstat (limited to 'inc/HTTPClient.php')
-rw-r--r--inc/HTTPClient.php2
1 files changed, 2 insertions, 0 deletions
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;