summaryrefslogtreecommitdiff
path: root/inc/HTTPClient.php
diff options
context:
space:
mode:
authorChristopher Smith <chris@jalakai.co.uk>2013-08-03 00:40:34 +0200
committerChristopher Smith <chris@jalakai.co.uk>2013-08-03 00:40:34 +0200
commitb8b64ed77285e4d753d35d4ceab0516be597a2f1 (patch)
tree7cc1a82a5887a9efeb3f9160f98613e65e404ba0 /inc/HTTPClient.php
parentaf07997c5ff7cc096965159d90158e3710d2d019 (diff)
parent586da9c1028b1013e8dc47911ba430671a389b5b (diff)
downloadrpg-b8b64ed77285e4d753d35d4ceab0516be597a2f1.tar.gz
rpg-b8b64ed77285e4d753d35d4ceab0516be597a2f1.tar.bz2
Merge branch 'master' into configmgr_improvements
Diffstat (limited to 'inc/HTTPClient.php')
-rw-r--r--inc/HTTPClient.php9
1 files changed, 3 insertions, 6 deletions
diff --git a/inc/HTTPClient.php b/inc/HTTPClient.php
index 0d7b80cf8..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;
@@ -806,12 +808,7 @@ class HTTPClient {
* @author Andreas Gohr <andi@splitbrain.org>
*/
function _postEncode($data){
- $url = '';
- foreach($data as $key => $val){
- if($url) $url .= '&';
- $url .= urlencode($key).'='.urlencode($val);
- }
- return $url;
+ return http_build_query($data,'','&');
}
/**