From: Martin Waitz Date: Tue, 19 Sep 2006 09:23:24 GMT Subject: Re: [PATCH] gitweb: use correct mime type even if filename has multiple dots. Message-ID: <20060919092324.GD31940@admingilde.org> In-Reply-To: <7vejua7um3.fsf@assigned-by-dhcp.cox.net> hoi :) On Sun, Sep 17, 2006 at 01:41:40AM -0700, Junio C Hamano wrote: > - read in mime.types, sort the entries with length of the > suffixes (longer first); > > - try matching the suffixes from longer to shorter and pick the > first match. > > Without that, you would not be able to cope with a /etc/mime.types > that looks like this, no? > > application/a a > application/b b.a > > Perhaps something like the attached. works perfectly, thanks. -- Martin Waitz