From 2b92a0946e0c566cdb0b0d0bd7219fa3dd956a43 Mon Sep 17 00:00:00 2001 From: mguessan Date: Thu, 29 Jul 2010 21:01:28 +0000 Subject: [PATCH] Caldav: call fixICS on download git-svn-id: http://svn.code.sf.net/p/davmail/code/trunk@1317 3d1905a2-6b24-0410-a738-b14d5a86fcbd --- src/java/davmail/exchange/ExchangeSession.java | 2 +- src/java/davmail/exchange/dav/DavExchangeSession.java | 4 ++-- src/java/davmail/exchange/ews/EwsExchangeSession.java | 5 ++--- 3 files changed, 5 insertions(+), 6 deletions(-) diff --git a/src/java/davmail/exchange/ExchangeSession.java b/src/java/davmail/exchange/ExchangeSession.java index b7511558..67d7d4d9 100644 --- a/src/java/davmail/exchange/ExchangeSession.java +++ b/src/java/davmail/exchange/ExchangeSession.java @@ -1605,7 +1605,7 @@ public abstract class ExchangeSession { * @return item body * @throws HttpException on error */ - public abstract String getBody() throws HttpException; + public abstract String getBody() throws IOException; /** * Get event name (file name part in URL). diff --git a/src/java/davmail/exchange/dav/DavExchangeSession.java b/src/java/davmail/exchange/dav/DavExchangeSession.java index e164f36b..805e51e3 100644 --- a/src/java/davmail/exchange/dav/DavExchangeSession.java +++ b/src/java/davmail/exchange/dav/DavExchangeSession.java @@ -797,7 +797,7 @@ public class DavExchangeSession extends ExchangeSession { * @throws HttpException on error */ @Override - public String getBody() throws HttpException { + public String getBody() throws IOException { String result; LOGGER.debug("Get event: " + permanentUrl); // try to get PR_INTERNET_CONTENT @@ -821,7 +821,7 @@ public class DavExchangeSession extends ExchangeSession { } catch (MessagingException e) { throw buildHttpException(e); } - return result; + return fixICS(result, true); } protected PutMethod internalCreateOrUpdate(String encodedHref, byte[] mimeContent) throws IOException { diff --git a/src/java/davmail/exchange/ews/EwsExchangeSession.java b/src/java/davmail/exchange/ews/EwsExchangeSession.java index 529bedd9..845cdd66 100644 --- a/src/java/davmail/exchange/ews/EwsExchangeSession.java +++ b/src/java/davmail/exchange/ews/EwsExchangeSession.java @@ -26,7 +26,6 @@ import davmail.http.DavGatewayHttpClientFacade; import davmail.util.IOUtil; import davmail.util.StringUtil; import org.apache.commons.codec.binary.Base64; -import org.apache.commons.httpclient.HttpException; import org.apache.commons.httpclient.HttpMethod; import org.apache.commons.httpclient.HttpStatus; import org.apache.commons.httpclient.methods.GetMethod; @@ -909,7 +908,7 @@ public class EwsExchangeSession extends ExchangeSession { } @Override - public String getBody() throws HttpException { + public String getBody() throws IOException { String result; LOGGER.debug("Get event: " + permanentUrl); try { @@ -918,7 +917,7 @@ public class EwsExchangeSession extends ExchangeSession { } catch (IOException e) { throw buildHttpException(e); } - return result; + return fixICS(result, true); } }