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