diff options
Diffstat (limited to 'actionpack/lib/action_controller/metal/live.rb')
-rw-r--r-- | actionpack/lib/action_controller/metal/live.rb | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/actionpack/lib/action_controller/metal/live.rb b/actionpack/lib/action_controller/metal/live.rb index 7db8d13e24..27b3eb4e58 100644 --- a/actionpack/lib/action_controller/metal/live.rb +++ b/actionpack/lib/action_controller/metal/live.rb @@ -36,8 +36,9 @@ module ActionController extend ActiveSupport::Concern module ClassMethods - def make_response!(request) - if request.env["HTTP_VERSION"] == "HTTP/1.0" + def make_response!(response) + request = response.request + if request.get_header("HTTP_VERSION") == "HTTP/1.0" super else Live::Response.new.tap do |res| @@ -293,8 +294,8 @@ module ActionController response.close if response end - def set_response!(request) - @_response = self.class.make_response! request + def set_response!(response) + @_response = self.class.make_response! response end end end |