]> git.p6c8.net - jirafeau_project.git/commitdiff
Fixes #3 Content type should always be put in headers
authorJerome Jutteau <mojo@couak.net>
Sun, 22 Feb 2015 22:56:45 +0000 (23:56 +0100)
committerJerome Jutteau <mojo@couak.net>
Sun, 22 Feb 2015 22:56:45 +0000 (23:56 +0100)
f.php

diff --git a/f.php b/f.php
index 6f8f836f72896a36761ca9acdd749af7c73ecf46..7faf028fce49f8fb49c0504ef5cd6b1e1f6db945 100644 (file)
--- a/f.php
+++ b/f.php
@@ -222,8 +222,7 @@ header ('Content-Length: ' . $link['file_size']);
 if (!jirafeau_is_viewable ($link['mime_type']) || !$cfg['preview'] || $button_download)
     header ('Content-Disposition: attachment; filename="' .
         $link['file_name'] . '"');
 if (!jirafeau_is_viewable ($link['mime_type']) || !$cfg['preview'] || $button_download)
     header ('Content-Disposition: attachment; filename="' .
         $link['file_name'] . '"');
-else
-    header ('Content-Type: ' . $link['mime_type']);
+header ('Content-Type: ' . $link['mime_type']);
 
 /* Read encrypted file. */
 if ($link['crypted'])
 
 /* Read encrypted file. */
 if ($link['crypted'])

patrick-canterino.de