aboutsummaryrefslogtreecommitdiffstats
path: root/actionpack/lib/action_controller
diff options
context:
space:
mode:
authorAndrey Glushkov <aglushkov@shakuro.com>2019-02-25 21:25:13 +0300
committerAndrey Glushkov <aglushkov@shakuro.com>2019-02-25 21:25:13 +0300
commit12c6e7b300d312fbaa6fd2d2d546419ff67bf910 (patch)
treedae51b7ddcd3451cb510fa2d166e936a56552d9c /actionpack/lib/action_controller
parent4ea067017ae52d4a74335ed85df085a86663d213 (diff)
downloadrails-12c6e7b300d312fbaa6fd2d2d546419ff67bf910.tar.gz
rails-12c6e7b300d312fbaa6fd2d2d546419ff67bf910.tar.bz2
rails-12c6e7b300d312fbaa6fd2d2d546419ff67bf910.zip
Allow custom cache-control header in AC::Live
https://github.com/rails/rails/issues/35312
Diffstat (limited to 'actionpack/lib/action_controller')
-rw-r--r--actionpack/lib/action_controller/metal/live.rb2
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