mirror of
https://github.com/e107inc/e107.git
synced 2025-01-17 12:48:24 +01:00
Issue #2638 - zlib compression content length.
This commit is contained in:
parent
382d92f9a8
commit
3e88c01261
22
class2.php
22
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);
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user