From 372b24fd3c00f9cc080ba5e2470fd2ec1a470adc Mon Sep 17 00:00:00 2001 From: mguessan Date: Sun, 2 Mar 2014 20:08:50 +0000 Subject: [PATCH] DAV: decode base64 content as ASCII git-svn-id: http://svn.code.sf.net/p/davmail/code/trunk@2238 3d1905a2-6b24-0410-a738-b14d5a86fcbd --- src/java/davmail/exchange/dav/DavExchangeSession.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/java/davmail/exchange/dav/DavExchangeSession.java b/src/java/davmail/exchange/dav/DavExchangeSession.java index 31a66810..bf76af19 100644 --- a/src/java/davmail/exchange/dav/DavExchangeSession.java +++ b/src/java/davmail/exchange/dav/DavExchangeSession.java @@ -1238,7 +1238,7 @@ public class DavExchangeSession extends ExchangeSession { String photo = get("photo"); if (photo != null) { // need to update photo - byte[] resizedImageBytes = IOUtil.resizeImage(Base64.decodeBase64(photo.getBytes()), 90); + byte[] resizedImageBytes = IOUtil.resizeImage(Base64.decodeBase64(photo.getBytes("ASCII")), 90); final PutMethod putmethod = new PutMethod(contactPictureUrl); putmethod.setRequestHeader("Overwrite", "t"); @@ -1342,7 +1342,7 @@ public class DavExchangeSession extends ExchangeSession { // PropFind PR_INTERNET_CONTENT String propertyValue = getItemProperty(permanentUrl, "internetContent"); if (propertyValue != null) { - byte[] byteArray = Base64.decodeBase64(propertyValue.getBytes()); + byte[] byteArray = Base64.decodeBase64(propertyValue.getBytes("ASCII")); result = getICS(new ByteArrayInputStream(byteArray)); } return result;