[HTTP_Download] : Security and MIME types
| From: | Mos | Date: | Tue, 16 Nov 2004 08:44:17 +0000 |
| Subject: | [HTTP_Download] : Security and MIME types | ||
| Groups: | php.pear.general | ||
| Request: | Send a blank email to pear-general+get-15554@lists.php.net to get a copy of this message | ||
Hi
I use HTTP_Download apckage to set up a feature to download some files.
Is reasonnable to set-up the 'contenttype' parameter in the staticSend
function ?
I mean to set tup this parameter (with Windows OS) I should guess it with
the 3 last characters of the filename. But this extension can be changed by
the users before uploading the file (the files to download can be upload by
users in a previous process).
Should I leave 'contenttype' to blank, just to open a "Save As" window with
a "Save" option chosen by default? If I set a 'contenttype' based on the
extension, this opens a "Save As" window with a Open option chosen by
default.
What do you think about that ?
Does anybody have another way to guess the MIME type ?
Mos