EWS: Force encoding in mimeContent decode

git-svn-id: http://svn.code.sf.net/p/davmail/code/trunk@2250 3d1905a2-6b24-0410-a738-b14d5a86fcbd
This commit is contained in:
mguessan 2014-03-10 22:19:28 +00:00
parent b75fb15483
commit 58ae6e1e91
1 changed files with 5 additions and 2 deletions

View File

@ -979,8 +979,11 @@ public abstract class EWSMethod extends PostMethod {
responseItem.mimeContent = ((TypedXMLStreamReader) reader).getElementAsBinary();
} else {
// failover: slow and memory consuming conversion
byte[] base64MimeContent = reader.getElementText().getBytes();
responseItem.mimeContent = Base64.decodeBase64(base64MimeContent);
try {
responseItem.mimeContent = Base64.decodeBase64(reader.getElementText().getBytes("ASCII"));
} catch (UnsupportedEncodingException e) {
throw new XMLStreamException(e);
}
}
}