@matheusbsbs / matheus-bagliano / commits / 618918e541
Fork 0

gitweb: Skip comments in mime.types like file

Signed-off-by: Jakub Narebski <jnareb@gmail.com> Signed-off-by: Junio C Hamano <junkio@cox.net>

Jakub Narebski committed Aug 14, 2006 at 02:15 UTC 618918e5411e2e769ad5e8d44c5d1cc363b983b5
1 file changed +1
gitweb/gitweb.perl
+1
@@ -858,6 +858,7 @@ sub mimetype_guess_file {
858 my %mimemap;
859 open(MIME, $mimemap) or return undef;
860 while (<MIME>) {
861 + next if m/^#/; # skip comments
862 my ($mime, $exts) = split(/\t+/);
863 if (defined $exts) {
864 my @exts = split(/\s+/, $exts);