summaryrefslogtreecommitdiffstats
path: root/app
diff options
context:
space:
mode:
authorJean-Philippe Lang <jp_lang@yahoo.fr>2010-04-17 12:45:23 +0000
committerJean-Philippe Lang <jp_lang@yahoo.fr>2010-04-17 12:45:23 +0000
commitaa4d1fe816cf035df9b5a92bf35619d51aaa53e5 (patch)
tree332206c169ce1b62f81f40f50f55fee95489f384 /app
parent2c0ce104e7c0e56bf7ce4f0c2f71547c1d3b07fb (diff)
downloadredmine-aa4d1fe816cf035df9b5a92bf35619d51aaa53e5.tar.gz
redmine-aa4d1fe816cf035df9b5a92bf35619d51aaa53e5.zip
Fixed: API 401 response does not include WWW-Authenticate header (#5322).
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@3679 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'app')
-rw-r--r--app/controllers/application_controller.rb4
1 files changed, 2 insertions, 2 deletions
diff --git a/app/controllers/application_controller.rb b/app/controllers/application_controller.rb
index f788c179d..5e2ab7ed9 100644
--- a/app/controllers/application_controller.rb
+++ b/app/controllers/application_controller.rb
@@ -128,8 +128,8 @@ class ApplicationController < ActionController::Base
respond_to do |format|
format.html { redirect_to :controller => "account", :action => "login", :back_url => url }
format.atom { redirect_to :controller => "account", :action => "login", :back_url => url }
- format.xml { head :unauthorized }
- format.json { head :unauthorized }
+ format.xml { head :unauthorized, 'WWW-Authenticate' => 'Basic realm="Redmine API"' }
+ format.json { head :unauthorized, 'WWW-Authenticate' => 'Basic realm="Redmine API"' }
end
return false
end