I'm curious if there's a good way to detect from a Rack middleware whether 
a response is streaming or not.

>From what I can see, my options are:

* In the Controller note we've included `ActionController::Live` somewhere 
the middleware can access it
* Look at the response object coming back to Rack to see if its class is 
`ActionController::Live::Response`
* Look at the `stream` (if available) on the response object returned to 
Rack to check if it's a `ActionController::Live::Buffer`

All of these ideas seem pretty brittle and liable to break across new 
versions of Rails and/or new streaming mechanisms that might come along. Is 
there something I'm missing?

Thanks!

Jason Clark
@jasonrclark
New Relic, Ruby Agent engineer

-- 
You received this message because you are subscribed to the Google Groups "Ruby 
on Rails: Core" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/rubyonrails-core.
For more options, visit https://groups.google.com/d/optout.

Reply via email to