diff options
author | Konstantin Haase <konstantin.mailinglists@googlemail.com> | 2014-10-02 15:35:27 +0200 |
---|---|---|
committer | Konstantin Haase <konstantin.mailinglists@googlemail.com> | 2014-10-02 15:35:27 +0200 |
commit | ab172af1b63f0d8e91ce579dd2907c43b96cf82a (patch) | |
tree | 991037ede0df148b5aef7137f321591401f98d53 /lib/rack/auth | |
parent | a71be3c914c10d1089238f4e21b029b885be4029 (diff) | |
parent | dc53a8c26dc55d21240233b3d83d36efdef6e924 (diff) | |
download | rack-ab172af1b63f0d8e91ce579dd2907c43b96cf82a.tar.gz |
Merge pull request #737 from schneems/schneems/less-objects
Less allocated objects on each request
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? |