From 58d03e039b5dbc0f3803e28fbc9914215bcaac60 Mon Sep 17 00:00:00 2001 From: mguessan Date: Thu, 4 Sep 2014 06:41:39 +0000 Subject: [PATCH] EWS: switch to GetMethod to check endpoint git-svn-id: http://svn.code.sf.net/p/davmail/code/trunk@2312 3d1905a2-6b24-0410-a738-b14d5a86fcbd --- src/java/davmail/exchange/ews/EwsExchangeSession.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/java/davmail/exchange/ews/EwsExchangeSession.java b/src/java/davmail/exchange/ews/EwsExchangeSession.java index 04e1ff00..792eedd9 100644 --- a/src/java/davmail/exchange/ews/EwsExchangeSession.java +++ b/src/java/davmail/exchange/ews/EwsExchangeSession.java @@ -172,7 +172,7 @@ public class EwsExchangeSession extends ExchangeSession { * @throws IOException on error */ protected void checkEndPointUrl(String endPointUrl) throws IOException { - HttpMethod checkMethod = new HeadMethod(endPointUrl); + HttpMethod checkMethod = new GetMethod(endPointUrl); checkMethod.setPath("/ews/services.wsdl"); checkMethod.setFollowRedirects(false); try { @@ -180,7 +180,7 @@ public class EwsExchangeSession extends ExchangeSession { if (status == HttpStatus.SC_UNAUTHORIZED) { // retry with /ews/exchange.asmx checkMethod.releaseConnection(); - checkMethod = new HeadMethod(endPointUrl); + checkMethod = new GetMethod(endPointUrl); checkMethod.setFollowRedirects(true); status = DavGatewayHttpClientFacade.executeNoRedirect(httpClient, checkMethod); if (status == HttpStatus.SC_UNAUTHORIZED) {