Caldav: do not send 401 on authentication error in Kerberos mode

git-svn-id: http://svn.code.sf.net/p/davmail/code/trunk@2072 3d1905a2-6b24-0410-a738-b14d5a86fcbd
This commit is contained in:
mguessan 2013-03-28 22:38:19 +00:00
parent acda06a8d8
commit 98c2e0d933
1 changed files with 6 additions and 1 deletions

View File

@ -170,7 +170,12 @@ public class CaldavConnection extends AbstractConnection {
session = ExchangeSessionFactory.getInstance(userName, password);
handleRequest(command, path, headers, content);
} catch (DavMailAuthenticationException e) {
sendUnauthorized();
if (Settings.getBooleanProperty("davmail.enableKerberos")) {
// authentication failed in Kerberos mode => not available
sendErr(HttpStatus.SC_SERVICE_UNAVAILABLE, "Kerberos authentication failed");
} else {
sendUnauthorized();
}
}
}