mirror of
https://github.com/git/git.git
synced 2024-11-24 10:26:17 +08:00
gitweb: Fix mimetype_guess_file for files with multiple extensions
Fix getting correct mimetype for "blob_plain" view for files which have multiple extensions, e.g. foo.1.html; now only the last extension is used to find mimetype. Noticed by Martin Waitz. Signed-off-by: Jakub Narebski <jnareb@gmail.com> Signed-off-by: Junio C Hamano <junkio@cox.net>
This commit is contained in:
parent
c774b2dcf6
commit
8059319acc
@ -1197,7 +1197,7 @@ sub mimetype_guess_file {
|
||||
}
|
||||
close(MIME);
|
||||
|
||||
$filename =~ /\.(.*?)$/;
|
||||
$filename =~ /\.([^.]*)$/;
|
||||
return $mimemap{$1};
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user