From fcf5e178dd6384cb5f9e99c0026ba958e426a03f Mon Sep 17 00:00:00 2001 From: Aaron Patterson Date: Thu, 24 Sep 2015 10:33:25 -0700 Subject: move the Header hash to the super class I want to move the header hash to the super request object in order to consolidate behavior. We should be switching out buffering strategies rather than header strategies since things like "mutating headers after send" is an error in both cases (buffering vs streaming). --- actionpack/lib/action_controller/metal/live.rb | 27 -------------------------- 1 file changed, 27 deletions(-) (limited to 'actionpack/lib/action_controller') diff --git a/actionpack/lib/action_controller/metal/live.rb b/actionpack/lib/action_controller/metal/live.rb index c874165816..5de5b02b32 100644 --- a/actionpack/lib/action_controller/metal/live.rb +++ b/actionpack/lib/action_controller/metal/live.rb @@ -213,33 +213,6 @@ module ActionController end class Response < ActionDispatch::Response #:nodoc: all - class Header < DelegateClass(Hash) # :nodoc: - def initialize(response, header) - @response = response - super(header) - end - - def []=(k,v) - if @response.committed? - raise ActionDispatch::IllegalStateError, 'header already sent' - end - - super - end - - def merge(other) - self.class.new @response, __getobj__.merge(other) - end - - def to_hash - __getobj__.dup - end - end - - def initialize(status = 200, header = {}, body = []) - super(status, Header.new(self, header), body) - end - private def before_committed -- cgit v1.2.3