Closed lkurylo closed 2 years ago
I have installed the Microsoft.AspNet.WebApi.MessageHandlers.Compression.Server package and added the handler
private static void RegisterMessageHandlers(this HttpConfiguration config) { config.MessageHandlers.Insert(0, new ServerCompressionHandler(new GZipCompressor(), new DeflateCompressor())); }
Unfortunatelly, as I see in Fiddler, the compression is not enabled:
HTTP/1.1 200 OK Cache-Control: no-cache Pragma: no-cache Content-Type: application/json Expires: -1 Server: Microsoft-IIS/10.0 X-AspNet-Version: 4.0.30319 X-Powered-By: ASP.NET Date: Thu, 17 May 2018 10:51:26 GMT Transfer-Encoding: chunked
Is there something I have missed?
I have encountered the same situation as you. If I turn off the web protection function of antivirus or changed the the value of agent header in request, the compression works.
I have installed the Microsoft.AspNet.WebApi.MessageHandlers.Compression.Server package and added the handler
Unfortunatelly, as I see in Fiddler, the compression is not enabled:
Is there something I have missed?