Microsoft DOCX not getting appropriate MIME type

Discussion in 'Install/Configuration' started by interlock, Jan 22, 2010.

  1. interlock

    interlock New Member

    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/
    docx = application/vnd.openxmlformats-officedocument.wordprocessingml.document
    dotm = application/
    dotx = application/vnd.openxmlformats-officedocument.wordprocessingml.template
    potm = application/
    potx = application/vnd.openxmlformats-officedocument.presentationml.template
    ppam = application/
    ppsm = application/
    ppsx = application/vnd.openxmlformats-officedocument.presentationml.slideshow
    pptm = application/
    pptx = application/vnd.openxmlformats-officedocument.presentationml.presentation
    xlam = application/
    xlsb = application/
    xlsm = application/
    xlsx = application/vnd.openxmlformats-officedocument.spreadsheetml.sheet
    xltm = application/
    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 file.
    Last edited: Jan 22, 2010
  2. NiteWave

    NiteWave Administrator

    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/ 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.
  3. mistwang

    mistwang LiteSpeed Staff

    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.
  4. NiteWave

    NiteWave Administrator

    with latest 4.0.12, docx added to MIME successfully.

    Content-Type in response header is what expecting:

  5. anewday

    anewday Moderator

    Force reinstall give error. It never worked since upgrading to 4.0.12.
  6. NiteWave

    NiteWave Administrator

    what's the error message? in my simple installation(without cPanel), force install by run ./ has always been successful.
  7. anewday

    anewday Moderator

    It's on a cpanel server. I forgot but it's nothing specific. Nothing in the error_log either.
  8. mistwang

    mistwang LiteSpeed Staff

    Then you need to upgrade manually to the latest build of 4.0.12. that has been fixed in the latest.

Share This Page