From aac566c23cd7c7673e682def9fa3af9ad9dc4bd4 Mon Sep 17 00:00:00 2001 From: Andreas Gohr Date: Fri, 5 Jun 2009 12:35:31 +0200 Subject: 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 --- inc/HTTPClient.php | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'inc/HTTPClient.php') 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); -- cgit v1.2.3