Consider file case when doing filename comparisons

This commit is contained in:
Ben Sarmiento
2024-01-27 11:54:28 +01:00
parent 803240b2eb
commit e01622064d
3 changed files with 12 additions and 14 deletions

View File

@@ -73,7 +73,8 @@ func CheckVersionFile(w http.ResponseWriter, req *http.Request, torMgr *torrent.
}
func getContentMimeType(filePath string) string {
switch filepath.Ext(filePath) {
fileExt := strings.ToLower(filepath.Ext(filePath))
switch fileExt {
case ".mkv":
return "video/x-matroska"
case ".mp4":