--- tbl_dump.original.php3 Fri Aug 24 23:47:51 2001 +++ tbl_dump.php3 Fri Aug 24 23:49:37 2001 @@ -113,10 +113,17 @@ } else { $ext = 'sql'; } + + $mime_types = array( + "bz2" => "application/x-bzip", + "gz" => "application/x-gzip", + "csv" => "text/csv", + "sql" => "text/plain" + ); // Send headers - header('Content-Type: application/octetstream'); - header('Content-Disposition: filename="' . $filename . '.' . $ext . '"'); + header("Content-Type: $mime_types[$ext]"); + header("Content-Disposition: attachment; filename=" . $filename . '.' . $ext . '"'); header('Pragma: no-cache'); header('Expires: 0'); } // end download