am fae90688: am 676ea183: Merge change I15dccd1f into eclair-mr2

Merge commit 'fae9068859f58e7b4ad2926b802370781b9fb609'

* commit 'fae9068859f58e7b4ad2926b802370781b9fb609':
  Server validates even though server address is wrong
This commit is contained in:
Marc Blank 2009-10-13 11:53:54 -07:00 committed by Android Git Automerger
commit 72058581e6

View File

@ -209,6 +209,12 @@ public class EasSyncService extends AbstractSyncService {
userLog("Validation (OPTIONS) response: " + code);
if (code == HttpStatus.SC_OK) {
// No exception means successful validation
Header commands = resp.getFirstHeader("MS-ASProtocolCommands");
Header versions = resp.getFirstHeader("ms-asprotocolversions");
if (commands == null || versions == null) {
userLog("OPTIONS response without commands or versions; reporting I/O error");
throw new MessagingException(MessagingException.IOERROR);
}
userLog("Validation successful");
return;
}