mirror of
https://github.com/phpbb/phpbb.git
synced 2025-06-27 21:58:52 +00:00
- finally fixed this one, IE has a bug that makes puppies cry.
git-svn-id: file:///svn/phpbb/trunk@6997 89ea8834-ac86-4346-8a33-228a782c2dd0
This commit is contained in:
parent
e526dfe83e
commit
4a83eb22da
1 changed files with 22 additions and 3 deletions
|
@ -504,6 +504,7 @@ class base_extractor
|
|||
var $download;
|
||||
var $time;
|
||||
var $format;
|
||||
var $run_comp = false;
|
||||
|
||||
function base_extractor($download = false, $store = false, $format, $filename, $time)
|
||||
{
|
||||
|
@ -551,7 +552,14 @@ class base_extractor
|
|||
break;
|
||||
|
||||
case 'gzip':
|
||||
ob_start('ob_gzhandler');
|
||||
if (isset($_SERVER['HTTP_ACCEPT_ENCODING']) && strpos($_SERVER['HTTP_ACCEPT_ENCODING'], 'gzip') !== false)
|
||||
{
|
||||
ob_start('ob_gzhandler');
|
||||
}
|
||||
else
|
||||
{
|
||||
$this->run_comp = true;
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
@ -604,12 +612,23 @@ class base_extractor
|
|||
|
||||
if ($this->download === true)
|
||||
{
|
||||
echo $data;
|
||||
if ($this->format === 'bzip2' || ($this->format === 'gzip' && !$this->run_comp))
|
||||
{
|
||||
echo $data;
|
||||
}
|
||||
|
||||
// we can write the gzip data as soon as we get it
|
||||
if ($this->format === 'gzip')
|
||||
{
|
||||
ob_flush();
|
||||
if ($this->run_comp)
|
||||
{
|
||||
echo gzencode($data);
|
||||
}
|
||||
else
|
||||
{
|
||||
ob_flush();
|
||||
flush();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue