diff options
Diffstat (limited to 'actionpack/lib/action_controller/base.rb')
-rwxr-xr-x | actionpack/lib/action_controller/base.rb | 17 |
1 files changed, 3 insertions, 14 deletions
diff --git a/actionpack/lib/action_controller/base.rb b/actionpack/lib/action_controller/base.rb index c012abc448..360e115f16 100755 --- a/actionpack/lib/action_controller/base.rb +++ b/actionpack/lib/action_controller/base.rb @@ -7,7 +7,6 @@ require 'action_controller/url_rewriter' require 'action_controller/status_codes' require 'drb' require 'set' -require 'digest/md5' module ActionController #:nodoc: class ActionControllerError < StandardError #:nodoc: @@ -474,6 +473,9 @@ module ActionController #:nodoc: send(method, *arguments) assign_default_content_type_and_charset + + response.request = request + response.prepare! response ensure process_cleanup @@ -876,20 +878,7 @@ module ActionController #:nodoc: response.body << text else response.body = text - - if text.is_a?(String) - if response.headers['Status'][0..2] == '200' && !response.body.empty? - response.headers['Etag'] = %("#{Digest::MD5.hexdigest(text)}") - - if request.headers['HTTP_IF_NONE_MATCH'] == response.headers['Etag'] - response.headers['Status'] = "304 Not Modified" - response.body = '' - end - end - end end - - response.body end def render_javascript(javascript, status = nil, append_response = true) #:nodoc: |