lib/rack/auth/abstract/handler.rb in rack-2.2.10 vs lib/rack/auth/abstract/handler.rb in rack-3.0.0.beta1
- old
+ new
@@ -1,7 +1,9 @@
# frozen_string_literal: true
+require_relative '../../constants'
+
module Rack
module Auth
# Rack::Auth::AbstractHandler implements common authentication functionality.
#
# +realm+ should be set for all handlers.
@@ -19,10 +21,10 @@
def unauthorized(www_authenticate = challenge)
return [ 401,
{ CONTENT_TYPE => 'text/plain',
CONTENT_LENGTH => '0',
- 'WWW-Authenticate' => www_authenticate.to_s },
+ 'www-authenticate' => www_authenticate.to_s },
[]
]
end
def bad_request