1
0
mirror of https://github.com/moparisthebest/davmail synced 2024-08-13 16:53:51 -04:00

IMAP: improve logging, do not log message content on 404 or 403

git-svn-id: http://svn.code.sf.net/p/davmail/code/trunk@1504 3d1905a2-6b24-0410-a738-b14d5a86fcbd
This commit is contained in:
mguessan 2010-10-14 20:54:20 +00:00
parent 5f2dd31203
commit e00158f524

View File

@ -591,7 +591,10 @@ public final class DavGatewayHttpClientFacade {
status = httpClient.executeMethod(method);
}
if (status != HttpStatus.SC_OK && (followRedirects || !isRedirect(status))) {
LOGGER.warn("GET failed with status " + status + " at " + method.getURI() + ": " + method.getResponseBodyAsString());
LOGGER.warn("GET failed with status " + status + " at " + method.getURI());
if (status != HttpStatus.SC_NOT_FOUND && status != HttpStatus.SC_FORBIDDEN) {
LOGGER.warn(method.getResponseBodyAsString());
}
throw DavGatewayHttpClientFacade.buildHttpException(method);
}
// check for expired session