diff options
author | Aaron Patterson <aaron.patterson@gmail.com> | 2014-02-17 16:11:19 -0800 |
---|---|---|
committer | Aaron Patterson <aaron.patterson@gmail.com> | 2014-02-17 16:11:19 -0800 |
commit | f43083609a0a16f91e5f1cfc98a289a23865aea8 (patch) | |
tree | 3a792b2e2588239e1e12d77924c79c3362922d53 /actionpack/lib/action_controller | |
parent | c18e7ab44706735d9b1274760bdc62ad5bef7757 (diff) | |
parent | 8508346dd06399aecd413b95da92b2d1b52f7d3c (diff) | |
download | rails-f43083609a0a16f91e5f1cfc98a289a23865aea8.tar.gz rails-f43083609a0a16f91e5f1cfc98a289a23865aea8.tar.bz2 rails-f43083609a0a16f91e5f1cfc98a289a23865aea8.zip |
Merge pull request #14000 from Fortisque/kevin/stream_error_management
streaming should change status of response when exception is caught
Diffstat (limited to 'actionpack/lib/action_controller')
-rw-r--r-- | actionpack/lib/action_controller/metal/live.rb | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/actionpack/lib/action_controller/metal/live.rb b/actionpack/lib/action_controller/metal/live.rb index 33014b97ca..fdf4ef293d 100644 --- a/actionpack/lib/action_controller/metal/live.rb +++ b/actionpack/lib/action_controller/metal/live.rb @@ -205,6 +205,8 @@ module ActionController begin super(name) rescue => e + @_response.status = 500 unless @_response.committed? + @_response.status = 400 if e.class == ActionController::BadRequest begin @_response.stream.write(ActionView::Base.streaming_completion_on_exception) if request.format == :html @_response.stream.call_on_error |