From ccba042ddeadd1b2562aec789969c65ca2960c01 Mon Sep 17 00:00:00 2001
From: chriskl {$lang['strshow']}\n";
echo "{$lang['stroptions']}
\n";
echo "
{$lang['strdownload']}\n";
- echo "
{$lang['strdownloadgzipped']}
{$lang['strdownloadgzipped']}\n";
+ }
+ echo "
\n"; echo "
\n"; echo $misc->form; diff --git a/dataexport.php b/dataexport.php index c2272a0f..9d4ca5d6 100644 --- a/dataexport.php +++ b/dataexport.php @@ -4,7 +4,7 @@ * Does an export to the screen or as a download. This checks to * see if they have pg_dump set up, and will use it if possible. * - * $Id: dataexport.php,v 1.16 2004/08/04 07:44:03 chriskl Exp $ + * $Id: dataexport.php,v 1.17 2004/11/04 02:56:51 chriskl Exp $ */ $extensions = array( @@ -93,14 +93,21 @@ // Make it do a download, if necessary if ($_REQUEST['output'] == 'download') { - header('Content-Type: application/download'); - - if (isset($extensions[$format])) - $ext = $extensions[$format]; - else - $ext = 'txt'; - - header('Content-Disposition: attachment; filename=dump.' . $ext); + // Set headers. MSIE is totally broken for SSL downloading, so + // we need to have it download in-place as plain text + if (strstr($_SERVER['HTTP_USER_AGENT'], 'MSIE') && isset($_SERVER['HTTPS'])) { + header('Content-Type: text/plain'); + } + else { + header('Content-Type: application/download'); + + if (isset($extensions[$format])) + $ext = $extensions[$format]; + else + $ext = 'txt'; + + header('Content-Disposition: attachment; filename=dump.' . $ext); + } } else { header('Content-Type: text/plain'); diff --git a/dbexport.php b/dbexport.php index 9f61d0f4..f8fa5315 100644 --- a/dbexport.php +++ b/dbexport.php @@ -3,7 +3,7 @@ * Does an export of a database or a table (via pg_dump) * to the screen or as a download. * - * $Id: dbexport.php,v 1.13 2004/10/06 08:39:49 jollytoad Exp $ + * $Id: dbexport.php,v 1.14 2004/11/04 02:56:51 chriskl Exp $ */ // Include application functions @@ -19,10 +19,18 @@ header('Content-Type: text/plain'); break; case 'download': - header('Content-Type: application/download'); - header('Content-Disposition: attachment; filename=dump.sql'); + // Set headers. MSIE is totally broken for SSL downloading, so + // we need to have it download in-place as plain text + if (strstr($_SERVER['HTTP_USER_AGENT'], 'MSIE') && isset($_SERVER['HTTPS'])) { + header('Content-Type: text/plain'); + } + else { + header('Content-Type: application/download'); + header('Content-Disposition: attachment; filename=dump.sql'); + } break; case 'gzipped': + // MSIE in SSL mode cannot do this - it should never get to this point header('Content-Type: application/download'); header('Content-Disposition: attachment; filename=dump.sql.gz'); break; -- 2.39.5