diff --git a/class2.php b/class2.php index b955b305d..922a8927b 100644 --- a/class2.php +++ b/class2.php @@ -2503,7 +2503,7 @@ class e_http_header if($this->compression_server_support == true && $this->compression_browser_support == true) { - $this->compress_output = varset(e107::getPref('compress_output'),false); + $this->compress_output = (bool) varset(e107::getPref('compress_output'),false); } else { @@ -2594,7 +2594,7 @@ class e_http_header $text .=print_a($server,true); - if($this->compress_output == true) + if($this->compress_output === true) { $text = gzencode($text, $this->compression_level); @@ -2642,28 +2642,18 @@ class e_http_header } - if($this->compress_output != false) + if($this->compress_output !== false) { - // $this->setHeader("ETag: \"{$this->etag}-gzip\""); - $this->setHeader('ETag: "'.$this->etag.'-gzip"', true); + $this->setHeader('ETag: "'.$this->etag.'-gzip"', true); $this->content = gzencode($this->content, $this->compression_level); + $this->length = strlen($this->content); $this->setHeader('Content-Encoding: gzip', true); $this->setHeader("Content-Length: ".$this->length, true); - } else { -/* - if($this->compression_browser_support ==true) - { - $this->setHeader('ETag: "'.$this->etag.'-gzip"', true); - } - else - {*/ - $this->setHeader('ETag: "'.$this->etag.'"', true); - // } - + $this->setHeader('ETag: "'.$this->etag.'"', true); $this->setHeader("Content-Length: ".$this->length, true); }