Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Missing .msg extension in FileExtensionContentTypeProvider #36576

Closed
fmflurry opened this issue Sep 15, 2021 · 3 comments
Closed

Missing .msg extension in FileExtensionContentTypeProvider #36576

fmflurry opened this issue Sep 15, 2021 · 3 comments
Labels
area-networking Includes servers, yarp, json patch, bedrock, websockets, http client factory, and http abstractions

Comments

@fmflurry
Copy link

fmflurry commented Sep 15, 2021

Describe the bug

Using FileExtensionContentTypeProvider TryGetContentType method with .msg file extension will not return application/vnd.ms-outlook.

We are using it to set Content-Type response header based on the file extension our user is trying to download. So far it’s working great but we had an issue where .msg files couldn’t be downloaded, and we found out in source code it is not supported.
https://github.com/dotnet/aspnetcore/blob/main/src/Middleware/StaticFiles/src/FileExtensionContentTypeProvider.cs

As a workaround we currently add .msg entry into Mappings but we believe that would be nice to support such a common extension.

@Tratcher
Copy link
Member

FYI:

// - We only plan to add new entries where we expect them to be applicable to a majority of developers such as being
// used in the project templates.

@fmflurry
Copy link
Author

fmflurry commented Sep 16, 2021

I'm aware of that comment, in my honest opinion .msg should be supported as outlook format is widely used in companies.
The change is trivial and could avoid bugs / headaches in the future.

Shall I open a PR or you're not planning to add a new entry for .msg ?

@adityamandaleeka
Copy link
Member

Triage: we don't think this meets the bar for inclusion per the referenced comment.

Since people can modify this list themselves, we don't want to update the defaults for this.

@ghost ghost locked as resolved and limited conversation to collaborators Nov 3, 2021
@amcasey amcasey added area-networking Includes servers, yarp, json patch, bedrock, websockets, http client factory, and http abstractions and removed area-runtime labels Aug 24, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
area-networking Includes servers, yarp, json patch, bedrock, websockets, http client factory, and http abstractions
Projects
None yet
Development

No branches or pull requests

4 participants