Re: [PATCH] gitweb: use correct mime type even if filename has multiple dots.
- From
Jakub Narebski <jnareb@gmail.com>
- Date
- Sep 16, 2006, 21:44 UTC
- Message-ID
- <eehr7e$5i0$1@sea.gmane.org>
- In-Reply-To
- <20060916210933.GX17042@admingilde.org>
Martin Waitz wrote:
> Match the last part of the filename agains the extention from the > mime database instead of insisting that it starts at the first dot.
[...]
> - $filename =~ /\.(.*?)$/;
> - return $mimemap{$1};Actually, that is non-greedy match, so the above code insist that extension starts at the _last_ dot.
-- Jakub Narebski Warsaw, Poland ShadeHawk on #git