We have an OWIN application (built with Nancy and WebAPI).
When hosting it in a console application (with Katana selfhost), I don't have any compression enabled on static content.
I've tried to look for a working example of OWIN GZip middleware.
So far found a few like:
Owin.Compression
nuget,
SqueezeMe
nuget,
https://gist.github.com/PinpointTownes/538cde1ed5e5d768355d
and
https://gist.github.com/PinpointTownes/ac7059733afcf91ec319
nothing seems to work - in the end the browser gets all responses without the Content-Encoding
header and not compressed.
Tried adding compression in the end of Nancy's pipeline - doesn't work either.
While hosting in IIS - the IIS takes care of the compression.
Am I missing something? Is there something that overwrites the response body stream and removes the headers? Or, maybe, the host itself should take care of the compression?
From additional reading, this could be related to the Katana host. But the issue also happens in Nowin host.
Thanks.
Transfer-Encoding: chunked
. – Aryéh Radlé