dxa-web-application-dotnet icon indicating copy to clipboard operation
dxa-web-application-dotnet copied to clipboard

MimeMapping.GetMimeMapping returns wrong mime types

Open ngibbonssdl opened this issue 3 years ago • 0 comments

The .NET Framework's MimeMapping.GetMimeMapping method used in the DefaultContentProvider is a little out of date when it comes to known MIME types.

WebP images are incorrectly returned with a MIME type of application/octet-stream when it should be image/webp.

Suggest using something like https://www.nuget.org/packages/MimeMapping/ and probably encapsulating this in another interface/service so different providers can be swapped in should needs be.

ngibbonssdl avatar Jul 09 '21 15:07 ngibbonssdl