mirror of
https://github.com/moparisthebest/davmail
synced 2025-01-07 03:38:05 -05:00
Caldav: do not try to load tasks MIME body
git-svn-id: http://svn.code.sf.net/p/davmail/code/trunk@2040 3d1905a2-6b24-0410-a738-b14d5a86fcbd
This commit is contained in:
parent
12f95e976c
commit
520a1429be
@ -1347,27 +1347,30 @@ public class DavExchangeSession extends ExchangeSession {
|
|||||||
@Override
|
@Override
|
||||||
public byte[] getEventContent() throws IOException {
|
public byte[] getEventContent() throws IOException {
|
||||||
byte[] result = null;
|
byte[] result = null;
|
||||||
LOGGER.debug("Get event subject: " + subject + " href: " + getHref() + " permanentUrl: " + permanentUrl);
|
LOGGER.debug("Get event subject: " + subject + " contentclass: "+contentClass+" href: " + getHref() + " permanentUrl: " + permanentUrl);
|
||||||
// try to get PR_INTERNET_CONTENT
|
// do not try to load tasks MIME body
|
||||||
try {
|
if (!"urn:content-classes:task".equals(contentClass)) {
|
||||||
result = getICSFromInternetContentProperty();
|
// try to get PR_INTERNET_CONTENT
|
||||||
if (result == null) {
|
try {
|
||||||
GetMethod method = new GetMethod(encodeAndFixUrl(permanentUrl));
|
result = getICSFromInternetContentProperty();
|
||||||
method.setRequestHeader("Content-Type", "text/xml; charset=utf-8");
|
if (result == null) {
|
||||||
method.setRequestHeader("Translate", "f");
|
GetMethod method = new GetMethod(encodeAndFixUrl(permanentUrl));
|
||||||
try {
|
method.setRequestHeader("Content-Type", "text/xml; charset=utf-8");
|
||||||
DavGatewayHttpClientFacade.executeGetMethod(httpClient, method, true);
|
method.setRequestHeader("Translate", "f");
|
||||||
result = getICS(method.getResponseBodyAsStream());
|
try {
|
||||||
} finally {
|
DavGatewayHttpClientFacade.executeGetMethod(httpClient, method, true);
|
||||||
method.releaseConnection();
|
result = getICS(method.getResponseBodyAsStream());
|
||||||
|
} finally {
|
||||||
|
method.releaseConnection();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
} catch (DavException e) {
|
||||||
|
LOGGER.warn(e.getMessage());
|
||||||
|
} catch (IOException e) {
|
||||||
|
LOGGER.warn(e.getMessage());
|
||||||
|
} catch (MessagingException e) {
|
||||||
|
LOGGER.warn(e.getMessage());
|
||||||
}
|
}
|
||||||
} catch (DavException e) {
|
|
||||||
LOGGER.warn(e.getMessage());
|
|
||||||
} catch (IOException e) {
|
|
||||||
LOGGER.warn(e.getMessage());
|
|
||||||
} catch (MessagingException e) {
|
|
||||||
LOGGER.warn(e.getMessage());
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// failover: rebuild event from MAPI properties
|
// failover: rebuild event from MAPI properties
|
||||||
@ -2081,6 +2084,7 @@ public class DavExchangeSession extends ExchangeSession {
|
|||||||
ITEM_PROPERTIES.add("instancetype");
|
ITEM_PROPERTIES.add("instancetype");
|
||||||
ITEM_PROPERTIES.add("urlcompname");
|
ITEM_PROPERTIES.add("urlcompname");
|
||||||
ITEM_PROPERTIES.add("subject");
|
ITEM_PROPERTIES.add("subject");
|
||||||
|
ITEM_PROPERTIES.add("contentclass");
|
||||||
}
|
}
|
||||||
|
|
||||||
protected Set<String> getItemProperties() {
|
protected Set<String> getItemProperties() {
|
||||||
|
Loading…
Reference in New Issue
Block a user