-
Notifications
You must be signed in to change notification settings - Fork 38
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Leaves RuntimeError (can't modify frozen Hash) when used with ActionController::Live Streaming #7
Comments
Here is some good reading: https://github.com/rails/rails/blob/6061c540ac7880233a6e32de85cec72c20ed8778/actionpack/lib/action_controller/metal/live.rb#L23 # There are a few caveats with this use. You *cannot* write headers after the
# response has been committed (Response#committed? will return truthy).
# Calling +write+ or +close+ on the response stream will cause the response
# object to be committed. Make sure all headers are set before calling write
# or close on your stream. |
Thanks a lot for this report! I definitely hadn't tested against an application with any streaming actions. I'll take a look, but I think your suggestion of leaving out the |
Might be as simple as making this a |
I have just experienced this exact error with ActionController::Live though I do not use this gem. Though I am testing my new production environment behind Cloudflare and cannot reproduce it consistently. Is it a good idea in general to |
@dimroc Might want to close this issue as well 😄 |
Ah yeah, fixed by #10. Thanks! |
Due to problems with Devise #17 reverted to |
I actually have no need to use the csrf with a streaming controller but because the gem places an
after_filter
on all controllers, I encounter the crash:Any Controller like the one below will get an error in the after_filer:
Some reference on Live::Streaming
http://dius.com.au/2014/03/21/server-sent-events-rails-4-angularjs/
Could there perhaps be a way to exclude certain controllers from the after_filter?
The text was updated successfully, but these errors were encountered: