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

Re: MIME types extension matching is case-sensitive

From: Ryan Schmidt <subversion-2009b_at_ryandesign.com>
Date: Thu, 28 May 2009 17:23:40 -0500

On May 28, 2009, at 16:31, petermity wrote:

> Using Subversion/TSVN 1.6.1 under Windows XP.
>
> I would like Subversion to set mime-types automatically.
>
> In config I have set mime-types-file to a mime.types file from
> Apache (with line-ends converted).
>
> All of the extensions in that file are lower case.
>
> If I add a file.jpg, it works, I get svn:mime-type of image/jpeg.
>
> If I add a file.JPG, it doesn't work, I get svn:mime-type of
> application/octet-stream.
>
> I'd really like to use the Apache file as-is.
>
> Is there some way to tell Subversion to match the extensions in a
> case-insensitive manner?

I don't know. I had not been aware of mime-types-file; looks like
this option is new for subversion 1.5. Prior to this, the only way to
set mime types automatically was to use the auto-props section in the
subversion config file. My config file is still set up in this way,
containing rules such as these:

[auto-props]

*.[Cc][Ss][Ss] = svn:eol-style=native;svn:mime-type=text/css
*.[Gg][Ii][Ff] = svn:mime-type=image/gif
*.[Hh][Tt][Mm] = svn:eol-style=native;svn:mime-type=text/html
*.[Hh][Tt][Mm][Ll] = svn:eol-style=native;svn:mime-type=text/html
*.[Jj][Pp][Ee][Gg] = svn:mime-type=image/jpeg
*.[Jj][Pp][Gg] = svn:mime-type=image/jpeg
*.[Jj][Ss] = svn:eol-style=native;svn:mime-type=text/javascript

And so on. Note the use of glob expressions at the beginning to match
extensions case-insensitively. I know subversion treats these rules
case-sensitively otherwise. I don't know about its handling of mime-
types-file.

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

To unsubscribe from this discussion, e-mail: [users-unsubscribe_at_subversion.tigris.org].
Received on 2009-05-29 00:24:47 CEST

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.