summaryrefslogtreecommitdiff
path: root/inc/HTTPClient.php
diff options
context:
space:
mode:
authorKlap-in <klapinklapin@gmail.com>2013-08-03 10:44:54 +0200
committerKlap-in <klapinklapin@gmail.com>2013-08-03 10:44:54 +0200
commit6acfab8732e1784b953c8cc2ae7408f84fda7ce8 (patch)
tree01e6ac38df46c9ad18f058c8d597617702eb67f3 /inc/HTTPClient.php
parent51bd6f039e782dca456022514893aa80bd7c52b9 (diff)
parentcab505616ec9b8ef3cd671e7337c91d065745932 (diff)
downloadrpg-6acfab8732e1784b953c8cc2ae7408f84fda7ce8.tar.gz
rpg-6acfab8732e1784b953c8cc2ae7408f84fda7ce8.tar.bz2
Merge remote-tracking branch 'origin/master' into changelogtestsonly
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,'','&');
}
/**