diff options
author | Adam Kocoloski <adam@cloudant.com> | 2010-06-16 15:17:36 -0400 |
---|---|---|
committer | Adam Kocoloski <adam@cloudant.com> | 2010-08-12 11:18:46 -0400 |
commit | b83ece9a18cacddbd98cdf1038a2b40ca9378f16 (patch) | |
tree | d2b6e6440e285ddaf37358a3905c9a911d261162 /src/chttpd.erl | |
parent | b229c6c4ec1e72a1ec7593d5626983e1d2065f67 (diff) |
better cookie auth failures. BugzID 1522, BugzID 10157
Diffstat (limited to 'src/chttpd.erl')
-rw-r--r-- | src/chttpd.erl | 5 |
1 files changed, 2 insertions, 3 deletions
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) -> |