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

Re: Bug in mod_dav_svn ? svn:mime-type not respected ?

From: Philip Martin <philip_at_codematters.co.uk>
Date: 2003-12-05 23:47:55 CET

"Francois Beausoleil" <fbos@users.sourceforge.net> writes:

> I believe I found a problem... Here's the output of svn proplist:
> C:\>svn pl -v
> https://svn.hopto.org:8193/repos/references/CSS/2.0/cover.html
> Properties on
> 'https://svn.hopto.org:8193/repos/references/CSS/2.0/cover.html':
> svn:mime-type : text/html
>
> But, Mozilla Firebird renders the page as text/plain, and reports it as
> such.

Hmmm...

$ svnadmin create repo
$ svn co http://localhost:8888/obj/repo wc
$ printf "<html>\nhello world\n</html>\n" > wc/foo
$ svn add wc/foo
$ svn ps svn:mime-type text/html wc/foo
$ svn ci wc -m ""
$ svn pl -v http://localhost:8888/obj/repo/foo
Properties on 'http://localhost:8888/obj/repo/foo':
  svn:mime-type : text/html

That looks OK so far, but the content type comes out as text/plain

$ wget -S http://localhost:8888/obj/repo/foo
--19:50:01-- http://localhost:8888/obj/repo/foo
           => `foo'
Resolving localhost... done.
Connecting to localhost[127.0.0.1]:8888... connected.
HTTP request sent, awaiting response...
 1 HTTP/1.1 200 OK
 2 Date: Fri, 05 Dec 2003 19:50:01 GMT
 3 Server: Apache/2.0.48 (Unix) DAV/2 SVN/0.34.0+
 4 ETag: "1//foo"
 5 Accept-Ranges: bytes
 6 Connection: close
 7 Content-Type: text/plain; charset=ISO-8859-1

Playing with httpd.conf shows that the DefaultType directive controls
the content type returned. Stepping through dav_svn_set_headers() I
see

1791 if ((mimetype == NULL)
1792 && (resource->type == DAV_RESOURCE_TYPE_VERSION)
1793 && (resource->info->repos_path != NULL))
1794 {
1795 svn_string_t *value;
(gdb) p resource->type
$1 = DAV_RESOURCE_TYPE_REGULAR
(gdb)

I know very little about DAV so I cannot say whether REGULAR or
VERSION is correct, but lines 1792-1793 were added in r7797.

-- 
Philip Martin
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Received on Fri Dec 5 23:48:33 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.