[svn.haxx.se] · SVN Dev · SVN Users · SVN Org · TSVN Dev · TSVN Users · Subclipse Dev · Subclipse Users · this month's index

svn docx missing mime type workaround?

From: <kmradke_at_rockwellcollins.com>
Date: Wed, 3 Aug 2011 11:14:18 -0500

IE7/8 do not like to correctly "open" MS office .docx files served
directly
from a svn repo with the default svn mime type. They will only allow you
to save them since it determines they are zip files.

The obvious solution is to just add the correct svn:mime-type, which works
fine, although it requires changes on every client if you want to use auto
props.

I was also able to do the following change on my apache 2.2 server to
override
the default Content-Type header value. (You must have previously loaded
the apache headers module for this to work...)

<IfModule headers_module>
  # Fix docx handling for IE7
  SetEnvIf Request_URI "\.docx$" docx_file
  Header set Content-Type
"application/vnd.openxmlformats-officedocument.wordprocessingml.document"
env=docx_file
</IfModule>

docx files now are identified as word documents and the user can "open"
them from IE7/8 without having to save an intermediate copy first.

The biggest downside I can see is that this will always override the
Content-Type for .docx files, including any values set by the user
using the svn:mime-type property. Anyone see any obvious other problems?

Kevin R.
Received on 2011-08-03 18:14:52 CEST

This is an archived mail posted to the Subversion Users mailing list.

This site is subject to the Apache Privacy Policy and the Apache Public Forum Archive Policy.