aspnet / BasicMiddleware

[Archived] Basic middleware components for ASP.NET Core. Project moved to https://github.com/aspnet/AspNetCore
Apache License 2.0
169 stars 84 forks source link

Added more GZIP compressable MIME types #181

Closed RehanSaeed closed 7 years ago

RehanSaeed commented 7 years ago

The MIME type list for what can be compressed is a bit basic. There are several other formats which can be compressed, including images and font file formats.

dnfclas commented 7 years ago

Hi @RehanSaeed, I'm your friendly neighborhood .NET Foundation Pull Request Bot (You can call me DNFBOT). Thanks for your contribution! You've already signed the contribution license agreement. Thanks!

The agreement was validated by .NET Foundation and real humans are currently evaluating your PR.

TTYL, DNFBOT;

Tratcher commented 7 years ago

Please open an issue with the recommended types and justifications for each. This was intentionally not an exhaustive list to start with. Everybody is going to have their own types they want and we don't want to maintain a huge list, only types that more than 50-80% of apps will use.

What did you think of the API for adding your own types in Startup? https://github.com/aspnet/BasicMiddleware/blob/dev/samples/ResponseCompressionSample/Startup.cs#L28

davidfowl commented 7 years ago

What did you think of the API for adding your own types in Startup? https://github.com/aspnet/BasicMiddleware/blob/dev/samples/ResponseCompressionSample/Startup.cs#L28

That API is pretty awful. Especially because of the lack of append... Though even with append it's strange to use IEnumerable<T> that way. Why isn't the list mutable (like MVC's model binders)

RehanSaeed commented 7 years ago

Agreed that a mutable collection would have been more natural, it's what I instinctively looked for but looking at the source found it to be an array. I've raised this https://github.com/aspnet/BasicMiddleware/issues/182 issue with my justifications for each MIME type.

muratg commented 7 years ago

@glennc will be considering the work required and will use https://github.com/aspnet/BasicMiddleware/issues/182 to track the work.

Closing this one. Thanks @RehanSaeed!