- 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 $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();
}
}
}
}