summaryrefslogtreecommitdiff
path: root/gitweb
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2011-07-13 21:31:36 (GMT)
committerJunio C Hamano <gitster@pobox.com>2011-07-13 21:31:36 (GMT)
commitd4c8c55fab116a22284696143f434574c32ee7e4 (patch)
tree75c8d29af3ead65dfbef2c462535f7f285bde412 /gitweb
parent6389a79dd4327333dd157a866dc99ebe7136d753 (diff)
parent93a6ad16a64acd0970799adc5039df3455f2d4f9 (diff)
downloadgit-d4c8c55fab116a22284696143f434574c32ee7e4.zip
git-d4c8c55fab116a22284696143f434574c32ee7e4.tar.gz
git-d4c8c55fab116a22284696143f434574c32ee7e4.tar.bz2
Merge branch 'ln/gitweb-mime-types-split-at-blank'
* ln/gitweb-mime-types-split-at-blank: gitweb: allow space as delimiter in mime.types
Diffstat (limited to 'gitweb')
-rwxr-xr-xgitweb/gitweb.perl9
1 files changed, 3 insertions, 6 deletions
diff --git a/gitweb/gitweb.perl b/gitweb/gitweb.perl
index 81dacf2..ecc9d3c 100755
--- a/gitweb/gitweb.perl
+++ b/gitweb/gitweb.perl
@@ -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);