зеркало из https://github.com/microsoft/git.git
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:
Коммит
d4c8c55fab
|
@ -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);
|
||||||
|
|
Загрузка…
Ссылка в новой задаче