1
0
mirror of https://github.com/moparisthebest/davmail synced 2025-02-28 09:21:49 -05:00

Improve message on invalid OWA uri

git-svn-id: http://svn.code.sf.net/p/davmail/code/trunk@1900 3d1905a2-6b24-0410-a738-b14d5a86fcbd
This commit is contained in:
mguessan 2012-02-06 21:40:11 +00:00
parent c5a46c176a
commit 4dd9c54c56

View File

@ -217,6 +217,9 @@ public final class ExchangeSessionFactory {
*/ */
public static void checkConfig() throws IOException { public static void checkConfig() throws IOException {
String url = Settings.getProperty("davmail.url"); String url = Settings.getProperty("davmail.url");
if (url == null || (!url.startsWith("http://") && !url.startsWith("https://"))) {
throw new DavMailException("LOG_INVALID_URL", url);
}
HttpClient httpClient = DavGatewayHttpClientFacade.getInstance(url); HttpClient httpClient = DavGatewayHttpClientFacade.getInstance(url);
GetMethod testMethod = new GetMethod(url); GetMethod testMethod = new GetMethod(url);
try { try {