From mboxrd@z Thu Jan 1 00:00:00 1970 From: mailings at hupie.com (Ferry Huberts) Date: Wed, 22 Jun 2011 23:22:19 +0200 Subject: mime types In-Reply-To: References: <4E023E2F.7050702@hupie.com> Message-ID: <4E025D0B.8040507@hupie.com> On 06/22/2011 11:01 PM, Lars Hjemli wrote: > On Wed, Jun 22, 2011 at 21:10, Ferry Huberts wrote: >> Instead of hardcoding the mime types cgit knows about, why not read >> /etc/mime.types when a mime type is needed? > > Yeah, an option to specify the path to a (httpd style) mime.types file > and then looking into this file when a mimetype lookup is needed (i.e. > in ui-plain.c) sounds like a good idea. already working on it :-) found ui-plain.c::print_object to change With the httpd style I hope you mean the same format as /etc/mime.types? My /etc/mime.types is provided by mailcap on F15 and CentOS/RHEL 5 It's format is very simple: - comments are empty lines or lines starting with a # - other lines are: mimetype [extension]+ I propose a new parameter called mime-types with a default of /etc/mime.types -- Ferry Huberts