FAQ about patches | More patches | Main Page | SHA256 digest for this patch

Fix the type of a .docx document
Patch is available for version: alpine 2.00 alpine 2.01
When Alpine attaches a file, it searches for the type of the file so that it will attach the file with the correct mime type. This is done, in a unix-type system, by searching for some "mime-type" files in your system. This includes files like /etc/mime.types (in Linux systems) or your own .mime-types. These files contain information on how to associate the extension of a file to its type.
In case that Alpine can not determine the type of the file from the extension, it looks for the the first few characters, which indicate what type of file this is. In the case of .docx files, these characters are the same of a .zip file, and therefore Alpine attaches .docx files as APPLICATION/ZIP files.
The problem this causes is that the recipients of your messages might have configured their programs to open APPLICATION/ZIP files, so they will not be able to see your ".docx" file, but instead they will see a compressed file, that when decompressed does not show the structure of a .docx file
This patch fixes Alpine by setting the type of a .docx document to be APPLICATION/VND.OPENXMLFORMATS-OFFICEDOCUMENT.WORDPROCESSINGML.DOCUMENT. Additionally, some other types, like .xlsx, pptx, etc. are attached with the correct type.

Last Updated 13:20:39 CDT Fri Jul 08 2011.