LiteSpeed Technologies
Download Download     Blog Blog     Wiki Wiki     Forum Forum     Store     Contact Contact    

Go Back   LiteSpeed Support Forums > LiteSpeed Web Server > Install/Configuration > Microsoft DOCX not getting appropriate MIME type

Reply
 
Thread Tools Display Modes
  #1  
Old 01-22-2010, 09:15 AM
interlock interlock is offline
New Member
 
Join Date: Dec 2009
Posts: 1
Default Microsoft DOCX not getting appropriate MIME type

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 by interlock; 01-22-2010 at 09:21 AM.. Reason: More info added
Reply With Quote
  #2  
Old 01-25-2010, 05:10 AM
NiteWave NiteWave is offline
LiteSpeed Staff
 
Join Date: Sep 2009
Posts: 2,226
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.
Reply With Quote
  #3  
Old 01-25-2010, 09:46 AM
mistwang mistwang is offline
LiteSpeed Staff
 
Join Date: May 2003
Location: New Jersey
Posts: 7,590
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.
Reply With Quote
  #4  
Old 01-25-2010, 06:30 PM
NiteWave NiteWave is offline
LiteSpeed Staff
 
Join Date: Sep 2009
Posts: 2,226
with latest 4.0.12, docx added to MIME successfully.

Content-Type in response header is what expecting:

application/vnd.openxmlformats-officedocument.wordprocessingml.document
Reply With Quote
  #5  
Old 01-25-2010, 10:27 PM
anewday anewday is offline
Senior Member
 
Join Date: Nov 2007
Location: New York
Posts: 723
Quote:
Originally Posted by mistwang View Post
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.
Reply With Quote
  #6  
Old 01-25-2010, 11:55 PM
NiteWave NiteWave is offline
LiteSpeed Staff
 
Join Date: Sep 2009
Posts: 2,226
Quote:
Originally Posted by anewday View Post
Force reinstall give error. It never worked since upgrading to 4.0.12.
what's the error message? in my simple installation(without cPanel), force install by run ./install.sh has always been successful.
Reply With Quote
  #7  
Old 01-26-2010, 05:24 PM
anewday anewday is offline
Senior Member
 
Join Date: Nov 2007
Location: New York
Posts: 723
It's on a cpanel server. I forgot but it's nothing specific. Nothing in the error_log either.
Reply With Quote
  #8  
Old 01-28-2010, 01:13 PM
mistwang mistwang is offline
LiteSpeed Staff
 
Join Date: May 2003
Location: New Jersey
Posts: 7,590
Quote:
Originally Posted by anewday View Post
Force reinstall give error. It never worked since upgrading to 4.0.12.
Then you need to upgrade manually to the latest build of 4.0.12. that has been fixed in the latest.
Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -7. The time now is 08:07 AM.



- Archive - Top
© Copyright 2003-2011 LiteSpeed Technologies, Inc. All rights reserved. Privacy Policy.