- 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:
David M 2007-02-17 03:20:14 +00:00
parent e526dfe83e
commit 4a83eb22da

View file

@ -504,6 +504,7 @@ class base_extractor
var $download; var $download;
var $time; var $time;
var $format; var $format;
var $run_comp = false;
function base_extractor($download = false, $store = false, $format, $filename, $time) function base_extractor($download = false, $store = false, $format, $filename, $time)
{ {
@ -551,7 +552,14 @@ class base_extractor
break; break;
case 'gzip': case 'gzip':
if (isset($_SERVER['HTTP_ACCEPT_ENCODING']) && strpos($_SERVER['HTTP_ACCEPT_ENCODING'], 'gzip') !== false)
{
ob_start('ob_gzhandler'); ob_start('ob_gzhandler');
}
else
{
$this->run_comp = true;
}
break; break;
} }
} }
@ -603,13 +611,24 @@ class base_extractor
} }
if ($this->download === true) if ($this->download === true)
{
if ($this->format === 'bzip2' || ($this->format === 'gzip' && !$this->run_comp))
{ {
echo $data; echo $data;
}
// we can write the gzip data as soon as we get it // we can write the gzip data as soon as we get it
if ($this->format === 'gzip') if ($this->format === 'gzip')
{
if ($this->run_comp)
{
echo gzencode($data);
}
else
{ {
ob_flush(); ob_flush();
flush();
}
} }
} }
} }