Unknown File Extensions Should Be Treated as Binary Files
---------------------------------------------------------

                 Key: MAGNOLIA-2702
                 URL: http://jira.magnolia-cms.com/browse/MAGNOLIA-2702
             Project: Magnolia
          Issue Type: Improvement
          Components: core
    Affects Versions: 3.6.5
            Reporter: Sean McMains
            Assignee: Philipp Bärfuss
         Attachments: defaultMime.patch

When mapping MIME types, there are generally 3 cases to be accounted for:

# File Extensions that are listed in the MIME Mapping Configuration
# File Extensions that are *not* listed in the MIME Mapping Configuration
# Paths without a file extension

Currently, in instance #2, the response is returned as *text/html*. As a 
result, if a user uploads a file of a type that Magnolia doesn't know about, 
the binary content will get dumped directly into the browser window. (This 
happened for us recently when a site manager uploaded an M4A file, one of the 
music file formats iTunes supports.) We were able to correct the problem by 
adding the appropriate MIME type definition to Magnolia's configuration, but it 
was clear that it would have been far more helpful for Magnolia to treat it as 
a binary file when it didn't know what the content was.

Here's a patch that, in instance #2, will return a MIME type of 
"application/octet-stream" instead of "text/html". Instance #1 and #3 will be 
unaffected.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: 
http://jira.magnolia-cms.com/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira



----------------------------------------------------------------
For list details see
http://www.magnolia-cms.com/home/community/mailing-lists.html
To unsubscribe, E-mail to: <[email protected]>
----------------------------------------------------------------

Reply via email to