We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent d66ee36 commit e341f85Copy full SHA for e341f85
1 file changed
src/ServiceStack.Text/HttpUtils.cs
@@ -1363,9 +1363,7 @@ public static string GetMimeType(string fileNameOrExt)
1363
if (string.IsNullOrEmpty(fileNameOrExt))
1364
throw new ArgumentNullException(nameof(fileNameOrExt));
1365
1366
- var parts = fileNameOrExt.Split('.');
1367
- var fileExt = parts[parts.Length - 1];
1368
-
+ var fileExt = fileNameOrExt.LastRightPart('.');
1369
if (ExtensionMimeTypes.TryGetValue(fileExt, out var mimeType))
1370
{
1371
return mimeType;
0 commit comments