Skip to content
Snippets Groups Projects
Commit b9d5f19b authored by Andreas Gohr's avatar Andreas Gohr
Browse files

more robustness in gzip decoding in HTTPClient FS#1718

Ignore-this: f55bde6815d68e6e79117cdc5e4d1f77

darcs-hash:20090725123032-7ad00-9f3e6289fd73f385020334545d38e779dc104dd6.gz
parent 9df39f14
No related branches found
No related tags found
No related merge requests found
......@@ -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;
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment