Server validates even though server address is wrong DO NOT MERGE

* Fixes #2173664
* Make sure that not only is the OPTIONS command accepted, but that
  the server reports EAS versions and commands

Change-Id: Ic29d3eacfdc54d107600afc443964a1e8b3d5e59
This commit is contained in:
Marc Blank 2009-10-07 17:10:46 -07:00
parent ba2d6de4b7
commit e53de6985a

View File

@ -208,6 +208,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;
}