aboutsummaryrefslogtreecommitdiffstats
path: root/actionpack/lib/action_controller
diff options
context:
space:
mode:
Diffstat (limited to 'actionpack/lib/action_controller')
-rwxr-xr-xactionpack/lib/action_controller/base.rb8
-rw-r--r--actionpack/lib/action_controller/streaming.rb4
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