Caldav: call fixICS on download

git-svn-id: http://svn.code.sf.net/p/davmail/code/trunk@1317 3d1905a2-6b24-0410-a738-b14d5a86fcbd
This commit is contained in:
mguessan 2010-07-29 21:01:28 +00:00
parent 3725a147c4
commit 2b92a0946e
3 changed files with 5 additions and 6 deletions

View File

@ -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).

View File

@ -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 {

View File

@ -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);
}
}