diff options
author | Aaron Patterson <tenderlove@github.com> | 2019-02-25 13:33:22 -0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-02-25 13:33:22 -0800 |
commit | 790a3e69acb2fa172c6bce45e040e9f15d9bef3d (patch) | |
tree | fc6f2491bfbf7585466f908956745ecb0cf53b98 /actionpack/lib/action_controller | |
parent | d1f68b50487ea1a8fc7f822973e2cc46d1288060 (diff) | |
parent | 12c6e7b300d312fbaa6fd2d2d546419ff67bf910 (diff) | |
download | rails-790a3e69acb2fa172c6bce45e040e9f15d9bef3d.tar.gz rails-790a3e69acb2fa172c6bce45e040e9f15d9bef3d.tar.bz2 rails-790a3e69acb2fa172c6bce45e040e9f15d9bef3d.zip |
Merge pull request #35400 from aglushkov/stream_manual_cache_control
Allow custom cache-control header in AC::Live
Diffstat (limited to 'actionpack/lib/action_controller')
-rw-r--r-- | actionpack/lib/action_controller/metal/live.rb | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/actionpack/lib/action_controller/metal/live.rb b/actionpack/lib/action_controller/metal/live.rb index 083b762f5a..eb43ff9c63 100644 --- a/actionpack/lib/action_controller/metal/live.rb +++ b/actionpack/lib/action_controller/metal/live.rb @@ -146,7 +146,7 @@ module ActionController def write(string) unless @response.committed? - @response.set_header "Cache-Control", "no-cache" + @response.headers["Cache-Control"] ||= "no-cache" @response.delete_header "Content-Length" end |