[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-07 23:55:05 CET

Branko ÄŒibej <brane@xbc.nu> writes:

> Francois Beausoleil wrote:
>
>>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.
>>
> I remember this being a "problem exists between keyboard and chair" type
> httpd configuration glitch, and I bet you have
>
> DefaultType text/plain
>
> in your httpd.conf.

I would expect svn:mime-type to override DefaultType. As far as I can
tell DefaultType does determine the Content-Type returned for a GET,
but even if DefaultType is not set the svn:mime-type doesn't get used.
This bit of code appears to be responsible

$ svn diff -r7796:7797
Index: subversion/mod_dav_svn/repos.c
===================================================================
--- subversion/mod_dav_svn/repos.c (revision 7796)
+++ subversion/mod_dav_svn/repos.c (revision 7797)
@@ -1777,7 +1777,9 @@
         }
     }
 
- if (mimetype == NULL)
+ if ((mimetype == NULL)
+ && (resource->type == DAV_RESOURCE_TYPE_VERSION)
+ && (resource->info->repos_path != NULL))
     {
       svn_string_t *value;

I see resource->type is DAV_RESOURCE_TYPE_REGULAR when responding to a
GET. If I use gdb to temporarily change resource->type from REGULAR
to VERSION then I see Content-Type set to svn:mime-type. I don't know
whether the code should allow REGULAR as well as VERSION or whether
type should be set to VERSION.

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