Caldav: Ignore 401 unauthorized on public event, return 200

git-svn-id: http://svn.code.sf.net/p/davmail/code/trunk@2033 3d1905a2-6b24-0410-a738-b14d5a86fcbd
This commit is contained in:
mguessan 2012-09-24 20:22:38 +00:00
parent bb4fb34582
commit d9966b77f0
1 changed files with 4 additions and 1 deletions

View File

@ -1674,8 +1674,11 @@ public class DavExchangeSession extends ExchangeSession {
}
// 440 means forbidden on Exchange
if (status == 440 || status == 401) {
if (status == 440) {
status = HttpStatus.SC_FORBIDDEN;
} else if (status == HttpStatus.SC_UNAUTHORIZED && getHref().startsWith("/public")) {
LOGGER.warn("Ignore 401 unauthorized on public event");
status = HttpStatus.SC_OK;
}
itemResult.status = status;
if (putMethod.getResponseHeader("GetETag") != null) {