From b83ece9a18cacddbd98cdf1038a2b40ca9378f16 Mon Sep 17 00:00:00 2001 From: Adam Kocoloski Date: Wed, 16 Jun 2010 15:17:36 -0400 Subject: better cookie auth failures. BugzID 1522, BugzID 10157 --- src/chttpd.erl | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'src/chttpd.erl') diff --git a/src/chttpd.erl b/src/chttpd.erl index 122a98a2..ee55f3e8 100644 --- a/src/chttpd.erl +++ b/src/chttpd.erl @@ -100,7 +100,6 @@ handle_request(MochiReq) -> {ok, Resp} = try - erase(cookie_auth_failed), case authenticate_request(HttpReq, AuthenticationFuns) of #httpd{} = Req -> HandlerFun = url_handler(HandlerKey), @@ -507,8 +506,8 @@ error_info({conflict, _}) -> {409, <<"conflict">>, <<"Document update conflict.">>}; error_info({forbidden, Msg}) -> {403, <<"forbidden">>, Msg}; -error_info({credentials_expired, Msg}) -> - {403, <<"credentials_expired">>, Msg}; +error_info({forbidden, Error, Msg}) -> + {403, Error, Msg}; error_info({unauthorized, Msg}) -> {401, <<"unauthorized">>, Msg}; error_info(file_exists) -> -- cgit v1.2.3