From 2d181b70511dbd72d2692f90853f5bc9558b05d0 Mon Sep 17 00:00:00 2001 From: jim-p Date: Tue, 27 Apr 2010 17:43:02 -0400 Subject: Fix IE downloading with HTTPS --- usr/local/www/exec.php | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) (limited to 'usr/local/www') diff --git a/usr/local/www/exec.php b/usr/local/www/exec.php index 957c91c..37a5464 100755 --- a/usr/local/www/exec.php +++ b/usr/local/www/exec.php @@ -47,8 +47,13 @@ if (($_POST['submit'] == "Download") && file_exists($_POST['dlPath'])) { header("Content-Length: " . filesize($_POST['dlPath'])); header("Content-Disposition: attachment; filename=\"" . trim(htmlentities(basename($_POST['dlPath']))) . "\""); - header("Pragma: private"); - header("Cache-Control: private, must-revalidate"); + if (isset($_SERVER['HTTPS'])) { + header('Pragma: '); + header('Cache-Control: '); + } else { + header("Pragma: private"); + header("Cache-Control: private, must-revalidate"); + } fpassthru($fd); exit; -- cgit v1.1