Comment #1 on issue 43649 by megazzt: Chrome adds .zip extension to pptx
file
http://code.google.com/p/chromium/issues/detail?id=43649
Chrome attempts to "fix" "bad" file extensions. Servers will attempt to
scan files
to determine "correct" file types in order to notify the client browser
about them.
This combination is producing this technically correct behavior.
First, understand then PPTX (and all Office 2007 filetypes) files are
renamed ZIP
files that have specific files and folders inside of them that Excel
recognizes as
its format.
Here is how the process goes, then.
1) The click requests the PPTX file and the server fetches it. Among the
metadata
returned by the server about the file is the file type. The server scans
the file
and determines (correctly) that it is a ZIP file and notifies the client.
2) Chrome is notified that the file is a ZIP but notices that the filename
does not
end in .ZIP, so it tries to be helpful (it can't know any better, it IS a
zip file)
and adds a .zip extension.
The REAL fix for this imo is for the server to not identify PPTX files as
ZIP files
to the client. If you use apache you can do this with a single line
in .htaccess
(IIRC the AddType directive; either specify the generic octet stream type
or look up
a proper mime type for PPTX).
Given that there are a number of different filetypes that are simply
renamed ZIPs
(XPI, JAR, PK3, DOCX, PPTX, etc) perhaps Chrome should also either have a
whitelist
of valie ZIP extensions it won't touch, or it should never rename ZIP type
files.
The current behavior could confuse users who don't understand how the ZIP
file format
is used in their PPTX document.