Merge branch 'ln/gitweb-mime-types-split-at-blank'

* ln/gitweb-mime-types-split-at-blank:
  gitweb: allow space as delimiter in mime.types
This commit is contained in:
Junio C Hamano 2011-07-13 14:31:36 -07:00
Родитель 6389a79dd4 93a6ad16a6
Коммит d4c8c55fab
1 изменённых файлов: 3 добавлений и 6 удалений

Просмотреть файл

@ -3562,12 +3562,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);