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; open(my $mh, '<', $mimemap) or return undef;
while (<$mh>) { while (<$mh>) {
next if m/^#/; # skip comments next if m/^#/; # skip comments
my ($mimetype, $exts) = split(/\t+/); my ($mimetype, @exts) = split(/\s+/);
if (defined $exts) { foreach my $ext (@exts) {
my @exts = split(/\s+/, $exts); $mimemap{$ext} = $mimetype;
foreach my $ext (@exts) {
$mimemap{$ext} = $mimetype;
}
} }
} }
close($mh); close($mh);