mirror of
https://github.com/moparisthebest/davmail
synced 2024-12-04 14:52:24 -05:00
IMAP: new header fix, do not rely on messageheaders attribute on full headers request, load message
git-svn-id: http://svn.code.sf.net/p/davmail/code/trunk@2152 3d1905a2-6b24-0410-a738-b14d5a86fcbd
This commit is contained in:
parent
2fe8bf6ce7
commit
d8aceb0edb
@ -861,6 +861,10 @@ public class ImapConnection extends AbstractConnection {
|
||||
baos.write(message.contentClass.getBytes("UTF-8"));
|
||||
baos.write(13);
|
||||
baos.write(10);
|
||||
} else if (requestedHeaders == null) {
|
||||
// load message and write all headers
|
||||
partOutputStream = new PartOutputStream(baos, true, false, startIndex, maxSize);
|
||||
partInputStream = messageWrapper.getRawInputStream();
|
||||
} else {
|
||||
Enumeration headerEnumeration = messageWrapper.getMatchingHeaderLines(requestedHeaders);
|
||||
while (headerEnumeration.hasMoreElements()) {
|
||||
@ -927,7 +931,7 @@ public class ImapConnection extends AbstractConnection {
|
||||
buffer.append(" {").append(baos.size()).append('}');
|
||||
sendClient(buffer.toString());
|
||||
// log content if less than 2K
|
||||
if (LOGGER.isDebugEnabled() /*&& baos.size() < 2048*/) {
|
||||
if (LOGGER.isDebugEnabled() && baos.size() < 2048) {
|
||||
LOGGER.debug(new String(baos.toByteArray(), "UTF-8"));
|
||||
}
|
||||
os.write(baos.toByteArray());
|
||||
|
Loading…
Reference in New Issue
Block a user