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>

Ludwig Nussel committed Jun 15, 2011 at 08:10 UTC 93a6ad16a64acd0970799adc5039df3455f2d4f9
1 file changed +3 -6
gitweb/gitweb.perl
+3 -6
@@ -3383,12 +3383,9 @@ sub mimetype_guess_file {
3383 open(my $mh, '<', $mimemap) or return undef;
3384 while (<$mh>) {
3385 next if m/^#/; # skip comments
3386 - my ($mimetype, $exts) = split(/\t+/);
3387 - if (defined $exts) {
3388 - my @exts = split(/\s+/, $exts);
3389 - foreach my $ext (@exts) {
3390 - $mimemap{$ext} = $mimetype;
3391 - }
3386 + my ($mimetype, @exts) = split(/\s+/);
3387 + foreach my $ext (@exts) {
3388 + $mimemap{$ext} = $mimetype;
3389 }
3390 }
3391 close($mh);