I'm using a specialized Response.Content of type PushStreamContent to stream content in chunks to client for long-running operations with client progress advance using pairs of stream.WriteAsync() and stream.Flush() (Transfer-Encoding: chunked).
To keep controller working, I've to mark it with [Compression(Enabled = false)] attribute: I suppose the compression filter read all the buffer to compress it invalidating my chunk trasmission.
Do you think is it possibile to test the type of Content and automatically disable compression if of type PushStreamContent or (better if possibile) test the property .buffered of the response stream?
Obviously this is not a big issue (I can mark my controllers with [Compression(Enabled = false)]) but it'll be very nice to have all automatically detected and managed.
Thanks
I'm using a specialized Response.Content of type PushStreamContent to stream content in chunks to client for long-running operations with client progress advance using pairs of stream.WriteAsync() and stream.Flush() (Transfer-Encoding: chunked). To keep controller working, I've to mark it with [Compression(Enabled = false)] attribute: I suppose the compression filter read all the buffer to compress it invalidating my chunk trasmission. Do you think is it possibile to test the type of Content and automatically disable compression if of type PushStreamContent or (better if possibile) test the property .buffered of the response stream? Obviously this is not a big issue (I can mark my controllers with [Compression(Enabled = false)]) but it'll be very nice to have all automatically detected and managed. Thanks