diff options
-rw-r--r-- | inc/HTTPClient.php | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/inc/HTTPClient.php b/inc/HTTPClient.php index e769b0c93..59046ceb5 100644 --- a/inc/HTTPClient.php +++ b/inc/HTTPClient.php @@ -415,8 +415,8 @@ class HTTPClient { fclose($socket); // decode gzip if needed - if($this->resp_headers['content-encoding'] == 'gzip'){ - $this->resp_body = gzinflate(substr($r_body, 10)); + if($this->resp_headers['content-encoding'] == 'gzip' && strlen($r_body) > 10 && substr($r_body,0,3)=="\x1f\x8b\x08"){ + $this->resp_body = @gzinflate(substr($r_body, 10)); }else{ $this->resp_body = $r_body; } |