Permalink
Browse files

And the same thing for Basic

  • Loading branch information...
Yehuda Katz + Carl Lerche
Yehuda Katz + Carl Lerche committed Aug 26, 2009
1 parent 3a5269e commit 5bc66f160d03bd60a748ac65728227ed9e4fc577
Showing with 2 additions and 1 deletion.
  1. +2 −1 actionpack/lib/action_controller/metal/http_authentication.rb
@@ -150,7 +150,8 @@ def encode_credentials(user_name, password)
def authentication_request(controller, realm)
controller.headers["WWW-Authenticate"] = %(Basic realm="#{realm.gsub(/"/, "")}")
- controller.__send__ :render, :text => "HTTP Basic: Access denied.\n", :status => :unauthorized
+ controller.response_body = "HTTP Basic: Access denied.\n"
+ controller.status = 401
end
end

0 comments on commit 5bc66f1

Please sign in to comment.