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

Re: Silly Mozilla question.

From: Greg Stein <gstein_at_lyra.org>
Date: 2003-03-14 05:34:16 CET

On Fri, Mar 14, 2003 at 12:52:28AM +0000, Paul Hammant wrote:
> Oops, it appears I jumped the gun a little.
>
> Mozilla-Composer pushes new HTML content to the server just fine.
> However in Moz and IE when looking at the page, the mime type is
> text/plain when it should be that the mine type should be text/html.
> I;m not sure whether this is a configurable setting or a deliberate
> design choice. After all CVS models text and binary only, it could have
> been that Subversion models the same.
>
> Is this the same for others? HTML coming thru as text/plain ?

Subversion uses text/plain for the default MIME type in an HTTP response. If
the svn:mime-type property is present on the file, then it will use that
instead. The svn client normally sets that to application/octet-stream if it
thinks the file being added is a binary file (according to a heuristic).

Given that you're adding files via Mozilla, then nothing is ever going to
set that property. But you *can* still get it set if you check out a
working copy(*), set them, and commit the propchange back:

$ svn co http://host.name/repos/path/to/html/files wc
$ cd wc
$ svn propset svn:mime-type text/html *.html
$ svn commit -m "set the MIME type to text/html"

And away you go :-)

Note that you can also set image/jpg MIME types, etc.

Cheers,
-g

(*) in a future release, you'll be able to do a propset directly on a
repository; for now, you need a working copy

-- 
Greg Stein, http://www.lyra.org/
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Received on Fri Mar 14 05:32:41 2003

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

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