Closed spboyer closed 7 years ago
Spec reference?
@spboyer How are you using this feature? Also the cache directive is meant to be used by proxies and caches so it's not clear that it applies to the response compression middleware here.
Looking at the tests for should compress, even though Kestrel is not a proxy it may receive no-transform and should not modify the resource being requested.
@spboyer which tests are you referring to? I still don't see why the no-transform
directive, which only applies to proxies and caches, would be significant here. The compression is a middleware on the server and shouldn't be looking for and changing its behaviour based on cache related headers. If the client wants a un-transformed resource, it should specify Accept-Encoding: identity
to obtain the untransformed version.
The "tests" i was referring to is the ShouldCompressResponse and GetCompressionProvider.
Noted the Accept-Encoding: identity
should be passed for a non-Encoded. Closing issue.
Needed additional checks in https://github.com/aspnet/BasicMiddleware/blob/dev/src/Microsoft.AspNetCore.ResponseCompression/ResponseCompressionProvider.cs#L107