[Trac-tickets] [The Trac Project] #1568: Case sensitive mime types

The Trac Project noreply at edgewall.com
Mon May 16 21:39:02 EDT 2005


#1568: Case sensitive mime types
-------------------------+--------------------------------------------------
       Id:  1568         |      Status:  new                     
Component:  browser      |    Modified:  Mon May 16 21:39:01 2005
 Severity:  enhancement  |   Milestone:  0.9                     
 Priority:  low          |     Version:  devel                   
    Owner:  jonas        |    Reporter:  PBruin                  
-------------------------+--------------------------------------------------
 My company still uses a lot of legacy code that has filenames like FILE1.C
 and FILE1.H. This means that the mimeview api does not recognize them as
 ''c'' files. Can you include the following patch in the trunk so the
 mimeview api becomes case insensitive?
 {{{
 Index: api.py
 ===================================================================
 --- api.py      (revision 1682)
 +++ api.py      (working copy)
 @@ -92,6 +92,7 @@
      try:
          i = filename.rfind('.')
          suffix = filename[i+1:]
 +        suffix = suffix.lower()
          return MIME_MAP[suffix]
      except KeyError:
          import mimetypes
 }}}

 Thanks.

-- 
Ticket URL: <http://projects.edgewall.com/trac/ticket/1568>
The Trac Project <>


More information about the Trac-Tickets mailing list