mirror of
https://github.com/moparisthebest/davmail
synced 2024-12-13 11:12:22 -05:00
IMAP: fix 3106803, IMAP client stuck scanning Inbox, fix header and body fetch in same request
git-svn-id: http://svn.code.sf.net/p/davmail/code/trunk@1541 3d1905a2-6b24-0410-a738-b14d5a86fcbd
This commit is contained in:
parent
e8a7e0b750
commit
f4ad37ee6f
@ -678,7 +678,7 @@ public class ImapConnection extends AbstractConnection {
|
||||
// get full param
|
||||
if (param.indexOf('[') >= 0) {
|
||||
StringBuilder paramBuffer = new StringBuilder(param);
|
||||
while (paramTokens.hasMoreTokens() && param.indexOf(']') < 0) {
|
||||
while (paramTokens.hasMoreTokens() && paramBuffer.indexOf("]") < 0) {
|
||||
paramBuffer.append(' ').append(paramTokens.nextToken());
|
||||
}
|
||||
param = paramBuffer.toString();
|
||||
|
@ -289,6 +289,11 @@ public class TestImap extends AbstractDavMailTestCase {
|
||||
assertEquals(". OK UID FETCH completed", readFullAnswer("."));
|
||||
}
|
||||
|
||||
public void testHeaderBodyFetch() throws IOException {
|
||||
writeLine(". UID FETCH " + messageUid + " (UID BODY.PEEK[HEADER.FIELDS (Content-Type Content-Transfer-Encoding)] BODY.PEEK[TEXT]<0.2048>)");
|
||||
assertEquals(". OK UID FETCH completed", readFullAnswer("."));
|
||||
}
|
||||
|
||||
public void testFetchInternalDate() throws IOException {
|
||||
writeLine(". UID FETCH " + messageUid + " (INTERNALDATE)");
|
||||
assertEquals(". OK UID FETCH completed", readFullAnswer("."));
|
||||
|
Loading…
Reference in New Issue
Block a user