diff options
author | Jeremy Kemper <jeremy@bitsweat.net> | 2006-09-29 08:12:16 +0000 |
---|---|---|
committer | Jeremy Kemper <jeremy@bitsweat.net> | 2006-09-29 08:12:16 +0000 |
commit | d7b5b44a0e6fddb772c1c0779489c17e1caa4a39 (patch) | |
tree | 2e9fc5e410264e970d086d9d8754af5cdf55681e /actionpack/lib/action_controller | |
parent | 4f3bf6cb23991af8fac69b67dc73844f6a92205e (diff) | |
download | rails-d7b5b44a0e6fddb772c1c0779489c17e1caa4a39.tar.gz rails-d7b5b44a0e6fddb772c1c0779489c17e1caa4a39.tar.bz2 rails-d7b5b44a0e6fddb772c1c0779489c17e1caa4a39.zip |
Deprecate @headers
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@5206 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
Diffstat (limited to 'actionpack/lib/action_controller')
-rwxr-xr-x | actionpack/lib/action_controller/base.rb | 8 | ||||
-rw-r--r-- | actionpack/lib/action_controller/streaming.rb | 4 |
2 files changed, 6 insertions, 6 deletions
diff --git a/actionpack/lib/action_controller/base.rb b/actionpack/lib/action_controller/base.rb index 02d731c4c8..5e5eab586c 100755 --- a/actionpack/lib/action_controller/base.rb +++ b/actionpack/lib/action_controller/base.rb @@ -312,7 +312,7 @@ module ActionController #:nodoc: # Holds a hash of header names and values. Accessed like <tt>headers["Cache-Control"]</tt> to get the value of the Cache-Control # directive. Values should always be specified as strings. - attr_accessor :headers + attr_internal :headers # Holds the hash of variables that are passed on to the template class to be made available to the view. This hash # is generated by taking a snapshot of all the instance variables in the current scope just before a template is rendered. @@ -1019,18 +1019,18 @@ module ActionController #:nodoc: @response = response @response.session = request.session - @_session = @response.session + @_session = @response.session @template = @response.template @assigns = @response.template.assigns - @headers = @response.headers + @_headers = @response.headers assign_deprecated_shortcuts(request, response) end # TODO: assigns cookies headers params request response template - DEPRECATED_INSTANCE_VARIABLES = %w(cookies flash params request session) + DEPRECATED_INSTANCE_VARIABLES = %w(cookies flash headers params request session) # Gone after 1.2. def assign_deprecated_shortcuts(request, response) diff --git a/actionpack/lib/action_controller/streaming.rb b/actionpack/lib/action_controller/streaming.rb index 51bede19c0..484913c7df 100644 --- a/actionpack/lib/action_controller/streaming.rb +++ b/actionpack/lib/action_controller/streaming.rb @@ -119,7 +119,7 @@ module ActionController #:nodoc: disposition <<= %(; filename="#{options[:filename]}") if options[:filename] - @headers.update( + headers.update( 'Content-Length' => options[:length], 'Content-Type' => options[:type].strip, # fixes a problem with extra '\r' with some browsers 'Content-Disposition' => disposition, @@ -132,7 +132,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' + headers['Cache-Control'] = 'private' if headers['Cache-Control'] == 'no-cache' end end end |