diff options
author | Andreas Gohr <andi@splitbrain.org> | 2009-06-05 12:35:31 +0200 |
---|---|---|
committer | Andreas Gohr <andi@splitbrain.org> | 2009-06-05 12:35:31 +0200 |
commit | aac566c23cd7c7673e682def9fa3af9ad9dc4bd4 (patch) | |
tree | 77e8a5490efaed678fe495de2876fe17566765b6 | |
parent | 58b091dee4e42c6703517f6f710998b63b403407 (diff) | |
download | rpg-aac566c23cd7c7673e682def9fa3af9ad9dc4bd4.tar.gz rpg-aac566c23cd7c7673e682def9fa3af9ad9dc4bd4.tar.bz2 |
Don't accept gzip encoding in HTTP client when content is expected to be truncated FS#1710
Ignore-this: 6bd3d5f18e32356a0efd908962ce78e4
darcs-hash:20090605103531-7ad00-f3917837f33a09696ad41c19df641f0554cb9456.gz
-rw-r--r-- | inc/HTTPClient.php | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/inc/HTTPClient.php b/inc/HTTPClient.php index 3d1ef3705..0c3b4f435 100644 --- a/inc/HTTPClient.php +++ b/inc/HTTPClient.php @@ -158,6 +158,14 @@ class HTTPClient { $this->error = ''; $this->status = 0; + // don't accept gzip if truncated bodies might occur + if($this->max_bodysize && + !$this->max_bodysize_abort && + $this->headers['Accept-encoding'] == 'gzip'){ + unset($this->headers['Accept-encoding']); + } + + $httpdata = array('url' => $url, 'data' => $data, 'method' => $method); |