Skip to content
This repository was archived by the owner on Dec 24, 2022. It is now read-only.

Commit 770d645

Browse files
authored
Support uppercase file extentions (#535)
1 parent e5e81f3 commit 770d645

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/ServiceStack.Text/HttpUtils.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
//Copyright (c) ServiceStack, Inc. All Rights Reserved.
1+
//Copyright (c) ServiceStack, Inc. All Rights Reserved.
22
//License: https://raw.github.com/ServiceStack/ServiceStack/master/license.txt
33

44
using System;
@@ -1556,7 +1556,7 @@ public static string GetMimeType(string fileNameOrExt)
15561556
if (string.IsNullOrEmpty(fileNameOrExt))
15571557
throw new ArgumentNullException(nameof(fileNameOrExt));
15581558

1559-
var fileExt = fileNameOrExt.LastRightPart('.');
1559+
var fileExt = fileNameOrExt.LastRightPart('.').ToLower();
15601560
if (ExtensionMimeTypes.TryGetValue(fileExt, out var mimeType))
15611561
{
15621562
return mimeType;

0 commit comments

Comments
 (0)