[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: petermity <6t12-n6js_at_dea.spamcon.org>
Date: Wed, 26 Aug 2009 23:22:18 -0700

petermity <6t12-n6js_at_dea.spamcon.org> wrote:

>petermity <6t12-n6js_at_dea.spamcon.org> wrote:
>
>>petermity <6t12-n6js_at_dea.spamcon.org> wrote:
>>
>>>Ryan Schmidt <subversion-2009b_at_ryandesign.com> wrote:
>>>
>>>>On Jun 2, 2009, at 03:37, Bolstridge, Andrew wrote:
>>>>
>>>>>>> I mean, there isn't any good reason why .jpg and .Jpg and .JPG
>>>>>>> should
>>>>>>> not match to the same mime-type, right?
>>>>>>
>>>>>> I can't think of any good reason, and nobody else has responded.
>>>>>
>>>>> Frankly, I can't think why SVN isn't case-insensitive for
>>>>> everything. If
>>>>> anyone has myfile.txt, Myfile.txt and MYFILE.txt in the same directory
>>>>> they need to be told about preventative maintenance :)
>>>>
>>>>I believe these would all come under the umbrella of backwards-
>>>>incompatible changes, and thus could not be considered until
>>>>Subversion 2.0 at the earliest.
>>>
>>>I can understand that view for essential commit and other operations - but
>>>it seems to me that for the specific case of mime-types-file extension
>>>matching, there are unlikely to be any compatibility issues.
>>
>>Since there has been no further discussion - I looked in the Subversion
>>Issue Tracker issue summaries for "case", "sensitive", and "mime", and did
>>not see this issue listed.
>>
>>Should I submit this, or did I miss it as an existing issue?
>>
>
>I was unable to signup to be able to enter this issue.
>
>Could someone else enter it?

I guess not. So for now I'm adding to our internal SVN documentation:

Fix mime.types for SVN bug
--------------------------

Unfortunately, Subversion is case-sensitive right now for the
extension, and the Apache mime.types file we use lists all
extensions in lowercase. So it will work fine when adding files
with all-lowercase extensions such as my.jpg but will not set the
mime type correctly with any other capitalization, so for
instance for my.JPG it sets the svn:mime-type to the generic
"application/octet-stream" instead of the expected specific
"image/jpeg".

If any of your projects might have uppercase extensions, you may
want to obtain fixmime.pl from ... and run it via:

perl fixmime.pl < mime.types > mime.types.upper

and replace your profile's mime.types with that.

Note that this will still only handle all upper case or all lower
case, not a mixture.

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

To unsubscribe from this discussion, e-mail: [users-unsubscribe_at_subversion.tigris.org].
Received on 2009-08-27 08:23:55 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.