summaryrefslogtreecommitdiff
path: root/gitweb
diff options
context:
space:
mode:
authorLudwig Nussel <ludwig.nussel@suse.de>2011-06-15 08:10:08 +0200
committerJunio C Hamano <gitster@pobox.com>2011-06-15 09:46:07 -0700
commit93a6ad16a64acd0970799adc5039df3455f2d4f9 (patch)
treeed46bace3c537bbbd9b2f8c0c20151c9b8bfbdf0 /gitweb
parentd8ead15963890a42f99fd0e7f3192b55cacd9404 (diff)
downloadgit-93a6ad16a64acd0970799adc5039df3455f2d4f9.tar.gz
gitweb: allow space as delimiter in mime.types
in openSUSE /etc/mime.types has only spaces. I don't know if there's a canonical reference that says that only tabs are allowed. Mutt at least also accepts spaces. So make gitweb more liberal too. Signed-off-by: Ludwig Nussel <ludwig.nussel@suse.de> Acked-by: Jakub Narebski <jnareb@gmail.com> Acked-by: John 'Warthog9' Hawley <warthog9@eaglescrag.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'gitweb')
-rwxr-xr-xgitweb/gitweb.perl9
1 files changed, 3 insertions, 6 deletions
diff --git a/gitweb/gitweb.perl b/gitweb/gitweb.perl
index f8db40a1c2..fc689f8370 100755
--- a/gitweb/gitweb.perl
+++ b/gitweb/gitweb.perl
@@ -3383,12 +3383,9 @@ sub mimetype_guess_file {
open(my $mh, '<', $mimemap) or return undef;
while (<$mh>) {
next if m/^#/; # skip comments
- my ($mimetype, $exts) = split(/\t+/);
- if (defined $exts) {
- my @exts = split(/\s+/, $exts);
- foreach my $ext (@exts) {
- $mimemap{$ext} = $mimetype;
- }
+ my ($mimetype, @exts) = split(/\s+/);
+ foreach my $ext (@exts) {
+ $mimemap{$ext} = $mimetype;
}
}
close($mh);