You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@subversion.apache.org by Chris Shenton <Ch...@hq.nasa.gov> on 2005/09/02 19:11:44 UTC

HTML files rendered by Apache as text/plain

One of my developers put some HTML files into our SVN repo, which is
fronted by Apache.  When he looks at them on his browser, Apache
serves them with mime-type text/plain, so the browser doesn't render
them properly.  I checked the Apache2 mime configs and everything's
sane -- for normal HTML files anyway.

I was able to get SVN to inform Apache to supply the correct mime-type
text/html by setting the svn:mime-type property for each of these
files.  Apache then passes the right mime-type header and the browser
renders it properly.  Is this the right way to do this?

Is there a way to tell SVN that all .html files should have mime-type
text/html instead of text/plain?

Is there a better way to do this?

Thanks!

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org

Re: HTML files rendered by Apache as text/plain

Posted by "Dale R. Worley" <dw...@pingtel.com>.
On Fri, 2005-09-02 at 15:11 -0400, Chris Shenton wrote:
> I was able to get SVN to inform Apache to supply the correct mime-type
> text/html by setting the svn:mime-type property for each of these
> files.  Apache then passes the right mime-type header and the browser
> renders it properly.  Is this the right way to do this?

Yes -- Since Subversion thinks it knows the actual MIME type of the
file, Apache does not have to guess based on the extension.

> Is there a way to tell SVN that all .html files should have mime-type
> text/html instead of text/plain?

Strictly speaking, no.  But you can set the Subversion preferences in
the users' accounts so that when svn adds a file with extension .html,
svn will also do an "svn propset svn:mime-type" on the file.

You can write a script that will do the propset on every .html file in a
WC, and then check it in.

Dale



---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org