summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorandi <andi@splitbrain.org>2005-05-04 21:47:42 +0200
committerandi <andi@splitbrain.org>2005-05-04 21:47:42 +0200
commitf08f25fa8502063411e467162282182ea9266d9d (patch)
tree991d903b8b8ff0f5dc11165ea08f6550e3d450b6
parent0b7c14c22e9810803e87a882cd9b3597b27fe74f (diff)
downloadrpg-f08f25fa8502063411e467162282182ea9266d9d.tar.gz
rpg-f08f25fa8502063411e467162282182ea9266d9d.tar.bz2
make application/* downloadable #301
darcs-hash:20050504194742-9977f-eb351d06513a29fa70279ce0029dadd5f03f3818.gz
-rw-r--r--fetch.php4
1 files changed, 4 insertions, 0 deletions
diff --git a/fetch.php b/fetch.php
index 2e11a3b06..daf03f293 100644
--- a/fetch.php
+++ b/fetch.php
@@ -74,6 +74,10 @@
header('Last-Modified: '.date('r',filemtime($FILE)));
header('Content-Length: '.filesize($FILE));
+ //application mime type is downloadable
+ if(substr($MIME,0,11) == 'application'){
+ header('Content-Disposition: attachment; filename="'.basename($FILE).'"');
+ }
$fp = @fopen($FILE,"rb");
if($fp){