Browse Source

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
master
mguessan 9 years ago
parent
commit
58d03e039b
  1. 4
      src/java/davmail/exchange/ews/EwsExchangeSession.java

4
src/java/davmail/exchange/ews/EwsExchangeSession.java

@ -172,7 +172,7 @@ public class EwsExchangeSession extends ExchangeSession { @@ -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 { @@ -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) {

Loading…
Cancel
Save