diff options
author | Yehuda Katz <wycats@gmail.com> | 2009-07-30 21:00:39 -0700 |
---|---|---|
committer | Yehuda Katz <wycats@gmail.com> | 2009-08-02 19:39:33 -0400 |
commit | 503ce1d01ce6c8eee9818f4e76a9f880bb1a291d (patch) | |
tree | cd7e9febdd4afab332bc677c76986c3bf1481930 /actionpack/lib/action_controller/base/streaming.rb | |
parent | f2a35723c8876697d5a7ebfdf329cee54d8a39ac (diff) | |
download | rails-503ce1d01ce6c8eee9818f4e76a9f880bb1a291d.tar.gz rails-503ce1d01ce6c8eee9818f4e76a9f880bb1a291d.tar.bz2 rails-503ce1d01ce6c8eee9818f4e76a9f880bb1a291d.zip |
Update cache_control to be a Hash of options that is used to build the header.
* Significantly simplifies setting and modifying cache control in other areas
Diffstat (limited to 'actionpack/lib/action_controller/base/streaming.rb')
-rw-r--r-- | actionpack/lib/action_controller/base/streaming.rb | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/actionpack/lib/action_controller/base/streaming.rb b/actionpack/lib/action_controller/base/streaming.rb index f52810ff3a..f0317c6e99 100644 --- a/actionpack/lib/action_controller/base/streaming.rb +++ b/actionpack/lib/action_controller/base/streaming.rb @@ -181,7 +181,7 @@ module ActionController #:nodoc: # after it displays the "open/save" dialog, which means that if you # hit "open" the file isn't there anymore when the application that # is called for handling the download is run, so let's workaround that - headers['Cache-Control'] = 'private' if headers['Cache-Control'] == 'no-cache' + response.cache_control[:public] ||= false end end end |