mirror of
https://github.com/moparisthebest/davmail
synced 2024-11-15 13:55:09 -05:00
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
This commit is contained in:
parent
15fd928588
commit
58d03e039b
@ -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) {
|
||||
|
Loading…
Reference in New Issue
Block a user