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

Re: Bad MIMETYPE configuration for .htm files accessed via SVN HTTP

From: Ryan Schmidt <subversion-2009d_at_ryandesign.com>
Date: Tue, 17 Nov 2009 04:38:59 -0600

On Nov 17, 2009, at 04:32, Ramachandran, Vishwanath(IE10) wrote:

> Videos rendered as html, does not open in Fire-fox. They play in IE. I believe actually, it is not a problem with Firefox. The MIMETYPE that is sent by the HTTP server clearly specifies to the browser that it should decode the sent content (the htm file in this case) as a plain text, which Firefox does. IE apparently overrides the HTTP MIMETYPEs with a mimetype contained in the file itself. According to W3C HTTP standards, the HTTP requests mimetypes shall always take precedence.
> However, I expect that without this MIMETYPE specified in the request, Firefox would then use the mimetype contained in the file to decide upon how to decode it.
>
> The problem comes from the SVN HTTP frontend: there should be a mapping table in one of the frontend configuration files, that maps known file extensions to appropriate mimetype such as *.jpg -> mimetype/image-jpeg. Apparently, the *.htm and *.html entries are either missing, either put as text/plain.

Use e.g. "svn propset svn:mime-type image/jpeg file.jpg" on each file in the working copy, followed by "svn commit", to give it the correct MIME type in the repository.

You can use automatic properties (auto-props) to automate the setting of svn:mime-type and other properties when new files are added on the client.

You can write a pre-commit hook to reject commits that add files with improper or missing MIME types.

P.S: You don't need to Cc me on your Subversion questions. If I have the time and knowledge to answer them, I'll do so on the mailing list.

------------------------------------------------------
http://subversion.tigris.org/ds/viewMessage.do?dsForumId=1065&dsMessageId=2418866

To unsubscribe from this discussion, e-mail: [users-unsubscribe_at_subversion.tigris.org].
Received on 2009-11-17 11:39:51 CET

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.