mirror of
https://github.com/moparisthebest/davmail
synced 2025-01-13 22:48:07 -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 ctag = "0";
|
||||||
String etag = "0";
|
String etag = "0";
|
||||||
String exchangeFolderPath = request.getExchangeFolderPath(subFolder);
|
String exchangeFolderPath = request.getExchangeFolderPath(subFolder);
|
||||||
try {
|
// do not try to access inbox on shared calendar
|
||||||
ctag = base64Encode(session.getFolderCtag(exchangeFolderPath));
|
if (!session.isSharedFolder(exchangeFolderPath)) {
|
||||||
etag = session.getFolderResourceTag(exchangeFolderPath);
|
try {
|
||||||
} catch (HttpException e) {
|
ctag = base64Encode(session.getFolderCtag(exchangeFolderPath));
|
||||||
// unauthorized access, probably an inbox on shared calendar
|
etag = session.getFolderResourceTag(exchangeFolderPath);
|
||||||
DavGatewayTray.debug(new BundleMessage("LOG_ACCESS_FORBIDDEN", exchangeFolderPath, e.getMessage()));
|
} 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.startResponse(URIUtil.encodePath(request.getPath(subFolder)));
|
||||||
response.startPropstat();
|
response.startPropstat();
|
||||||
@ -504,7 +507,8 @@ public class CaldavConnection extends AbstractConnection {
|
|||||||
CaldavResponse response = new CaldavResponse(HttpStatus.SC_MULTI_STATUS);
|
CaldavResponse response = new CaldavResponse(HttpStatus.SC_MULTI_STATUS);
|
||||||
response.startMultistatus();
|
response.startMultistatus();
|
||||||
appendInbox(response, request, null);
|
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 {
|
try {
|
||||||
DavGatewayTray.debug(new BundleMessage("LOG_SEARCHING_CALENDAR_MESSAGES"));
|
DavGatewayTray.debug(new BundleMessage("LOG_SEARCHING_CALENDAR_MESSAGES"));
|
||||||
List<ExchangeSession.Event> events = session.getEventMessages(request.getExchangeFolderPath());
|
List<ExchangeSession.Event> events = session.getEventMessages(request.getExchangeFolderPath());
|
||||||
|
Loading…
Reference in New Issue
Block a user