mirror of
https://github.com/moparisthebest/davmail
synced 2024-11-12 20:35:15 -05: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:
parent
5f2dd31203
commit
e00158f524
@ -591,7 +591,10 @@ public final class DavGatewayHttpClientFacade {
|
|||||||
status = httpClient.executeMethod(method);
|
status = httpClient.executeMethod(method);
|
||||||
}
|
}
|
||||||
if (status != HttpStatus.SC_OK && (followRedirects || !isRedirect(status))) {
|
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);
|
throw DavGatewayHttpClientFacade.buildHttpException(method);
|
||||||
}
|
}
|
||||||
// check for expired session
|
// check for expired session
|
||||||
|
Loading…
Reference in New Issue
Block a user