1
0
mirror of https://github.com/moparisthebest/davmail synced 2025-01-12 05:58:48 -05:00

IMAP: fix 2971184, do not decode content in partial fetch (replace getDataHandler with PartOutputStream)

git-svn-id: http://svn.code.sf.net/p/davmail/code/trunk@1007 3d1905a2-6b24-0410-a738-b14d5a86fcbd
This commit is contained in:
mguessan 2010-04-20 09:16:20 +00:00
parent 7778e4ea69
commit 50adca5572

View File

@ -590,7 +590,7 @@ public class ImapConnection extends AbstractConnection {
mimeMessage.writeTo(new PartialOutputStream(baos, startIndex, maxSize));
} else if ("TEXT".equals(partIndexString)) {
// write message without headers
mimeMessage.getDataHandler().writeTo(new PartialOutputStream(baos, startIndex, maxSize));
mimeMessage.writeTo(new PartOutputStream(baos, false, true, startIndex, maxSize));
} else if ("RFC822.HEADER".equals(param) || partIndexString.startsWith("HEADER")) {
// write headers only
mimeMessage.writeTo(new PartOutputStream(baos, true, false, startIndex, maxSize));
@ -620,7 +620,7 @@ public class ImapConnection extends AbstractConnection {
}
// write selected part, without headers
bodyPart.getDataHandler().writeTo(new PartialOutputStream(baos, startIndex, maxSize));
bodyPart.writeTo(new PartOutputStream(baos, false, true, startIndex, maxSize));
}
baos.close();