diff options
Diffstat (limited to 'lib/rack/auth')
-rw-r--r-- | lib/rack/auth/abstract/handler.rb | 8 | ||||
-rw-r--r-- | lib/rack/auth/digest/request.rb | 2 |
2 files changed, 5 insertions, 5 deletions
diff --git a/lib/rack/auth/abstract/handler.rb b/lib/rack/auth/abstract/handler.rb index 214df629..c657691e 100644 --- a/lib/rack/auth/abstract/handler.rb +++ b/lib/rack/auth/abstract/handler.rb @@ -17,8 +17,8 @@ module Rack def unauthorized(www_authenticate = challenge) return [ 401, - { 'Content-Type' => 'text/plain', - 'Content-Length' => '0', + { CONTENT_TYPE => 'text/plain', + CONTENT_LENGTH => '0', 'WWW-Authenticate' => www_authenticate.to_s }, [] ] @@ -26,8 +26,8 @@ module Rack def bad_request return [ 400, - { 'Content-Type' => 'text/plain', - 'Content-Length' => '0' }, + { CONTENT_TYPE => 'text/plain', + CONTENT_LENGTH => '0' }, [] ] end diff --git a/lib/rack/auth/digest/request.rb b/lib/rack/auth/digest/request.rb index 706c651c..01994364 100644 --- a/lib/rack/auth/digest/request.rb +++ b/lib/rack/auth/digest/request.rb @@ -7,7 +7,7 @@ module Rack module Digest class Request < Auth::AbstractRequest def method - @env['rack.methodoverride.original_method'] || @env['REQUEST_METHOD'] + @env['rack.methodoverride.original_method'] || @env[REQUEST_METHOD] end def digest? |