DAV: decode base64 content as ASCII

git-svn-id: http://svn.code.sf.net/p/davmail/code/trunk@2238 3d1905a2-6b24-0410-a738-b14d5a86fcbd
This commit is contained in:
mguessan 2014-03-02 20:08:50 +00:00
parent 7fec75ddb7
commit 372b24fd3c
1 changed files with 2 additions and 2 deletions

View File

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