diff options
author | Ludwig Nussel <ludwig.nussel@suse.de> | 2011-06-15 08:10:08 +0200 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2011-06-15 18:46:07 +0200 |
commit | 93a6ad16a64acd0970799adc5039df3455f2d4f9 (patch) | |
tree | ed46bace3c537bbbd9b2f8c0c20151c9b8bfbdf0 /gitweb/gitweb.perl | |
parent | fetch: do not leak a refspec (diff) | |
download | git-93a6ad16a64acd0970799adc5039df3455f2d4f9.tar.xz git-93a6ad16a64acd0970799adc5039df3455f2d4f9.zip |
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/gitweb.perl')
-rwxr-xr-x | gitweb/gitweb.perl | 9 |
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); |