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

Commit e341f85

Browse files
committed
Update HttpUtils.cs
1 parent d66ee36 commit e341f85

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

src/ServiceStack.Text/HttpUtils.cs

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1363,9 +1363,7 @@ public static string GetMimeType(string fileNameOrExt)
13631363
if (string.IsNullOrEmpty(fileNameOrExt))
13641364
throw new ArgumentNullException(nameof(fileNameOrExt));
13651365

1366-
var parts = fileNameOrExt.Split('.');
1367-
var fileExt = parts[parts.Length - 1];
1368-
1366+
var fileExt = fileNameOrExt.LastRightPart('.');
13691367
if (ExtensionMimeTypes.TryGetValue(fileExt, out var mimeType))
13701368
{
13711369
return mimeType;

0 commit comments

Comments
 (0)