Commit ac103b52 authored by Mickaël Guessant's avatar Mickaël Guessant

EWS: switch to GetMethod to check endpoint

git-svn-id: https://svn.code.sf.net/p/davmail/code/trunk@2312 3d1905a2-6b24-0410-a738-b14d5a86fcbd
parent bf8c2cc6
......@@ -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) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment