diff options
author | Yehuda Katz <wycats@gmail.com> | 2009-02-02 09:54:23 -0800 |
---|---|---|
committer | Yehuda Katz <wycats@gmail.com> | 2009-02-02 09:54:23 -0800 |
commit | 44cdf0c5fe080d470429ab0640af25e927244907 (patch) | |
tree | 0dcaa131da49eaeb0e056d0b4cc03673bf5af4c2 /actionpack/lib | |
parent | 3030bc90c95e335d726f06fd7a61ed96055e9109 (diff) | |
download | rails-44cdf0c5fe080d470429ab0640af25e927244907.tar.gz rails-44cdf0c5fe080d470429ab0640af25e927244907.tar.bz2 rails-44cdf0c5fe080d470429ab0640af25e927244907.zip |
Some merge cleanup
Diffstat (limited to 'actionpack/lib')
-rw-r--r-- | actionpack/lib/action_controller/base/base.rb | 4 | ||||
-rwxr-xr-x | actionpack/lib/action_dispatch/http/request.rb | 21 |
2 files changed, 13 insertions, 12 deletions
diff --git a/actionpack/lib/action_controller/base/base.rb b/actionpack/lib/action_controller/base/base.rb index a01d8f25cc..29d87d8125 100644 --- a/actionpack/lib/action_controller/base/base.rb +++ b/actionpack/lib/action_controller/base/base.rb @@ -862,7 +862,7 @@ module ActionController #:nodoc: end def close_session - @_session.close if @_session && @_session.respond_to?(:close) + # @_session.close if @_session && @_session.respond_to?(:close) end def default_template(action_name = self.action_name) @@ -895,7 +895,7 @@ module ActionController #:nodoc: Base.class_eval do [ Filters, Layout, Renderer, Redirector, Responder, Benchmarking, Rescue, Flash, MimeResponds, Helpers, Cookies, Caching, Verification, Streaming, SessionManagement, - HttpAuthentication::Basic::ControllerMethods, RecordIdentifier, + HttpAuthentication::Basic::ControllerMethods, HttpAuthentication::Digest::ControllerMethods, RecordIdentifier, RequestForgeryProtection, Translation ].each do |mod| include mod diff --git a/actionpack/lib/action_dispatch/http/request.rb b/actionpack/lib/action_dispatch/http/request.rb index 366ac26421..94cce869f7 100755 --- a/actionpack/lib/action_dispatch/http/request.rb +++ b/actionpack/lib/action_dispatch/http/request.rb @@ -94,25 +94,26 @@ module ActionDispatch end end end - + # Returns the accepted MIME type for the request. def accepts @accepts ||= begin header = @env['HTTP_ACCEPT'].to_s.strip - fallback = xhr? ? Mime::JS : Mime::HTML + fallback = xhr? ? Mime::JS : Mime::HTML - if header.empty? - [content_type, fallback, Mime::ALL].compact - else - ret = Mime::Type.parse(header) - if ret.last == Mime::ALL - ret.insert(-2, fallback) + if header.empty? + [content_type, fallback, Mime::ALL].compact + else + ret = Mime::Type.parse(header) + if ret.last == Mime::ALL + ret.insert(-2, fallback) + end + ret end - ret end end - + def if_modified_since if since = env['HTTP_IF_MODIFIED_SINCE'] Time.rfc2822(since) rescue nil |