Closed Tratcher closed 7 years ago
Putting in 1.1.0 for now. We can move it to 1.2.0 if we can't finish this off in time.
GZipStream allocations: https://github.com/dotnet/corefx/issues/12549
@Tratcher Per PM decision, version numbers for new packages will be 1.0.0-preview1 for the initial release. (Not 1.1.0-preview1)
Review feedback:
AddResponseCompression(params string[])
overload, investigate defaults and wildcards instead. Text/*, Application/javascript. https://github.com/aspnet/BasicMiddleware/issues/121Reading from config works pretty well:
{
"section": {
"EnableForHttps": true,
"MimeTypes": ["text/plain", "text/html"]
}
}
services.AddResponseCompression(options =>
{
Configuration.GetSection("section").Bind(options);
});
Possible default mime types (things used by the template, static files): text/css text/html application/javascript
WebApi: application/xml text/xml application/json text/json application/json-patch+json
Other: text/plain
Maybe adding "image/svg+xml" to the default types.
@Yves57 justification? We're not trying to capture every possible type, just the ones to make the 90% scenario work. I based this list on the files included in the full WebApp template, as well as those types from MVC/WebAPI.
Closing this now that we've worked through the main checklists. Further questions, feedback, etc. should be filed in new issues.
@Tratcher Because SVG is a standard included in W3C recommandations. So I don't think it's "exotic"...
Open items:
Compression providersCompression negotiatorshould mime types be case sensitive? (No)Make sure no negotiation happens / no bytes written if there's no body.FlushHook ISendFileFeature?Testing:
How much buffering does the gzip stream do?8kbIntegration test with WebListener, Kestrel,IIS/Expressnginxhttps://github.com/aspnet/BasicMiddleware/issues/123Perfhttps://github.com/dotnet/corefx/issues/12549Release: