diff options
author | Aaron Patterson <aaron.patterson@gmail.com> | 2015-09-08 11:11:30 -0700 |
---|---|---|
committer | Aaron Patterson <aaron.patterson@gmail.com> | 2015-09-08 16:14:41 -0700 |
commit | b42c58636571ccbf4bfc23f89039f43e63c98211 (patch) | |
tree | 6829378edf939fe94d3d5518838d7e01da3eacc4 | |
parent | 3e55fd755ac9c1d1f84f8dadd42112e2ee592a3a (diff) | |
download | rails-b42c58636571ccbf4bfc23f89039f43e63c98211.tar.gz rails-b42c58636571ccbf4bfc23f89039f43e63c98211.tar.bz2 rails-b42c58636571ccbf4bfc23f89039f43e63c98211.zip |
use accessors instead of manipulating the hash
in the future I would like to make the header hash read only (or at
least remove guarantees that mutations will do anything).
-rw-r--r-- | actionpack/lib/action_controller/metal/live.rb | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/actionpack/lib/action_controller/metal/live.rb b/actionpack/lib/action_controller/metal/live.rb index 69583f8ab4..667c7f87ca 100644 --- a/actionpack/lib/action_controller/metal/live.rb +++ b/actionpack/lib/action_controller/metal/live.rb @@ -145,8 +145,8 @@ module ActionController def write(string) unless @response.committed? - @response.headers["Cache-Control"] = "no-cache" - @response.headers.delete "Content-Length" + @response.set_header "Cache-Control", "no-cache" + @response.delete_header "Content-Length" end super |