mirror of
https://github.com/moparisthebest/davmail
synced 2025-01-13 06:28:19 -05:00
Caldav: do not try to access inbox on shared calendar (to avoid 440 login timeout errors and session reset)
git-svn-id: http://svn.code.sf.net/p/davmail/code/trunk@975 3d1905a2-6b24-0410-a738-b14d5a86fcbd
This commit is contained in:
parent
37aa6db3f2
commit
5f7226bddf
@ -421,12 +421,15 @@ public class CaldavConnection extends AbstractConnection {
|
||||
String ctag = "0";
|
||||
String etag = "0";
|
||||
String exchangeFolderPath = request.getExchangeFolderPath(subFolder);
|
||||
try {
|
||||
ctag = base64Encode(session.getFolderCtag(exchangeFolderPath));
|
||||
etag = session.getFolderResourceTag(exchangeFolderPath);
|
||||
} catch (HttpException e) {
|
||||
// unauthorized access, probably an inbox on shared calendar
|
||||
DavGatewayTray.debug(new BundleMessage("LOG_ACCESS_FORBIDDEN", exchangeFolderPath, e.getMessage()));
|
||||
// do not try to access inbox on shared calendar
|
||||
if (!session.isSharedFolder(exchangeFolderPath)) {
|
||||
try {
|
||||
ctag = base64Encode(session.getFolderCtag(exchangeFolderPath));
|
||||
etag = session.getFolderResourceTag(exchangeFolderPath);
|
||||
} catch (HttpException e) {
|
||||
// unauthorized access, probably an inbox on shared calendar
|
||||
DavGatewayTray.debug(new BundleMessage("LOG_ACCESS_FORBIDDEN", exchangeFolderPath, e.getMessage()));
|
||||
}
|
||||
}
|
||||
response.startResponse(URIUtil.encodePath(request.getPath(subFolder)));
|
||||
response.startPropstat();
|
||||
@ -504,7 +507,8 @@ public class CaldavConnection extends AbstractConnection {
|
||||
CaldavResponse response = new CaldavResponse(HttpStatus.SC_MULTI_STATUS);
|
||||
response.startMultistatus();
|
||||
appendInbox(response, request, null);
|
||||
if (request.getDepth() == 1 && !Settings.getBooleanProperty("davmail.caldavDisableInbox")) {
|
||||
// do not try to access inbox on shared calendar
|
||||
if (!session.isSharedFolder(request.getExchangeFolderPath(null)) && request.getDepth() == 1 && !Settings.getBooleanProperty("davmail.caldavDisableInbox")) {
|
||||
try {
|
||||
DavGatewayTray.debug(new BundleMessage("LOG_SEARCHING_CALENDAR_MESSAGES"));
|
||||
List<ExchangeSession.Event> events = session.getEventMessages(request.getExchangeFolderPath());
|
||||
|
Loading…
Reference in New Issue
Block a user