Could someone please review this issue from March?
This prevents streaming from working in Rails by default. The ETag middleware is enabled in the default stack and it has to read all content before generating the ETag hash. It will skip any processing if the Cache-Control header is set to no-cache but this is not managed automatically by Rails.
The solution might seem simple and simply tell people that they should add this header for streamed actions but some browsers have bugs for streamed responses containing both "Cache-Control: no-cache" and "Content-Disposition: attachement".
Currently in order to support streaming in my application I had to insert two other middlewares around the ETag one in order to detect the response is a streamed one and set and restore the Cache-Control header so that ETag generation is skipped for such actions. (code in the issue's comments)
Since Live Streaming is a major feature of Rails 4 and has been broken for a while already it would be great if it could be fixed for the next Rails release if possible.
Could someone please take a look at this issue?