summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLibravatar Junio C Hamano <gitster@pobox.com>2011-07-13 14:31:36 -0700
committerLibravatar Junio C Hamano <gitster@pobox.com>2011-07-13 14:31:36 -0700
commitd4c8c55fab116a22284696143f434574c32ee7e4 (patch)
tree75c8d29af3ead65dfbef2c462535f7f285bde412
parentMerge branch 'jc/no-gitweb-test-without-cgi-etc' (diff)
parentgitweb: allow space as delimiter in mime.types (diff)
downloadtgif-d4c8c55fab116a22284696143f434574c32ee7e4.tar.xz
Merge branch 'ln/gitweb-mime-types-split-at-blank'
* ln/gitweb-mime-types-split-at-blank: gitweb: allow space as delimiter in mime.types
-rwxr-xr-xgitweb/gitweb.perl9
1 files changed, 3 insertions, 6 deletions
diff --git a/gitweb/gitweb.perl b/gitweb/gitweb.perl
index 81dacf2b6a..ecc9d3cca3 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);