mirror of
https://github.com/moparisthebest/davmail
synced 2024-12-04 14:52:24 -05:00
IMAP: improve invalid message header test
git-svn-id: http://svn.code.sf.net/p/davmail/code/trunk@2151 3d1905a2-6b24-0410-a738-b14d5a86fcbd
This commit is contained in:
parent
c035b094c4
commit
2fe8bf6ce7
@ -1089,10 +1089,10 @@ public class DavExchangeSession extends ExchangeSession {
|
||||
final String MS_HEADER = "Microsoft Mail Internet Headers Version 2.0";
|
||||
if (messageHeaders.startsWith(MS_HEADER)) {
|
||||
messageHeaders = messageHeaders.substring(MS_HEADER.length());
|
||||
if (messageHeaders.charAt(0) == '\r') {
|
||||
if (!messageHeaders.isEmpty() && messageHeaders.charAt(0) == '\r') {
|
||||
messageHeaders = messageHeaders.substring(1);
|
||||
}
|
||||
if (messageHeaders.charAt(0) == '\n') {
|
||||
if (!messageHeaders.isEmpty() && messageHeaders.charAt(0) == '\n') {
|
||||
messageHeaders = messageHeaders.substring(1);
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user