Microsoft DOCX not getting appropriate MIME type

#1
We have some Microsoft Office 2007 files that clients have added to
their sites. These are docx files, so we added the mime types to
handle these:

docm = application/vnd.ms-word.document.macroEnabled.12
docx = application/vnd.openxmlformats-officedocument.wordprocessingml.document
dotm = application/vnd.ms-word.template.macroEnabled.12
dotx = application/vnd.openxmlformats-officedocument.wordprocessingml.template
potm = application/vnd.ms-powerpoint.template.macroEnabled.12
potx = application/vnd.openxmlformats-officedocument.presentationml.template
ppam = application/vnd.ms-powerpoint.addin.macroEnabled.12
ppsm = application/vnd.ms-powerpoint.slideshow.macroEnabled.12
ppsx = application/vnd.openxmlformats-officedocument.presentationml.slideshow
pptm = application/vnd.ms-powerpoint.presentation.macroEnabled.12
pptx = application/vnd.openxmlformats-officedocument.presentationml.presentation
xlam = application/vnd.ms-excel.addin.macroEnabled.12
xlsb = application/vnd.ms-excel.sheet.binary.macroEnabled.12
xlsm = application/vnd.ms-excel.sheet.macroEnabled.12
xlsx = application/vnd.openxmlformats-officedocument.spreadsheetml.sheet
xltm = application/vnd.ms-excel.template.macroEnabled.12
xltx = application/vnd.openxmlformats-officedocument.spreadsheetml.template

Litespeed returns these documents as: application/octet-stream

In IE these have the extension .zip appended, which makes them difficult to open for non-technical people. Firefox ignores the mime type and keeps the .docx.

It would be ideal to have the proper mime type returned with these documents for those unfortunate enough to have to use IE.

We did restart LSWS after editing the mime.properties file.
 
Last edited:

NiteWave

Administrator
#2
I tested a test.docx file on 4.0.12

1. Server-->General-->MIME Settings-->Add

Suffixes: docx
Mime Type:application/vnd.openxmlformats-officedocument.wordprocessingml.document

2.restart lsws, there is an error in error.log:

[ERROR] [MIME] File /usr/local/lsws-4.0.11/conf/mime.properties line 23: (MIME description is too long) - "docx"

so current version lsws can't add this docx MIME.

but when download test.docx on IE6, it'll save as it is, no extension .zip appended.

this is what I verified for this issue.
 

mistwang

LiteSpeed Staff
#3
MIME type length limit was 60 characters. has been increased to 256.
please update to the latest build of LSWS 4.0.12.
If you are using 4.0.12, just do "force reinstall" from web console.
 

NiteWave

Administrator
#4
with latest 4.0.12, docx added to MIME successfully.

Content-Type in response header is what expecting:

application/vnd.openxmlformats-officedocument.wordprocessingml.document
 

anewday

Well-Known Member
#5
MIME type length limit was 60 characters. has been increased to 256.
please update to the latest build of LSWS 4.0.12.
If you are using 4.0.12, just do "force reinstall" from web console.
Force reinstall give error. It never worked since upgrading to 4.0.12.
 
Top