mirror of
https://github.com/moparisthebest/k-9
synced 2024-12-25 09:08:49 -05:00
Work-around for a buggy POP3 server software that places "+OK" in front of every line of the unique-id listing (UIDL response).
Fixes issue 1237
This commit is contained in:
parent
938317e700
commit
d595033fa8
@ -513,6 +513,18 @@ public class Pop3Store extends Store
|
||||
break;
|
||||
}
|
||||
String[] uidParts = response.split(" ");
|
||||
if ((uidParts.length >= 3) && "+OK".equals(uidParts[0]))
|
||||
{
|
||||
/*
|
||||
* At least one server software places a "+OK" in
|
||||
* front of every line in the unique-id listing.
|
||||
*
|
||||
* Fix up the array if we detected this behavior.
|
||||
* See Issue 1237
|
||||
*/
|
||||
uidParts[0] = uidParts[1];
|
||||
uidParts[1] = uidParts[2];
|
||||
}
|
||||
if (uidParts.length >= 2)
|
||||
{
|
||||
Integer msgNum = Integer.valueOf(uidParts[0]);
|
||||
|
Loading…
Reference in New Issue
Block a user