mirror of
https://github.com/git/git.git
synced 2025-03-19 12:08:46 +00:00
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:
commit
d4c8c55fab
@ -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);
|
||||
|
Loading…
x
Reference in New Issue
Block a user