tpeczek/Lib.AspNetCore.ServerSentEvents

Сompression doesn't work when targeting 451 framework

Closed this issue · 2 comments

Hi @tpeczek . I read your article https://www.tpeczek.com/2017/08/aspnet-core-response-compression.html . Did you find any solution how to workaround this issue? Can you suggest something?

Thanks in advance

Hi @kabazakra. I didn't invest much time into this as I currently don't hvae any ASP.NET Core applications running on top of .NET Framework. The original issue which added flushing support to DeflateStream in .NET Core has "netfx-port-consider" label on it, but I believe this haven't happened yet.

One approach I could suggest is writting your own ICompressionProvider based on SharpZipLib which seems to be handling flushing correctly and supports GZip and Deflate. I've written a blog post about extending Response Compression Middleware with custom provides, so it should be a good starting point --> https://www.tpeczek.com/2017/03/extending-aspnet-core-response.html.

Thanks for your advice, @tpeczek . Works fine with SharpZipLib .