From 47a0aef919bdb4b168027d969bbf8c709fe9d00b Mon Sep 17 00:00:00 2001 From: mguessan Date: Wed, 7 Jan 2009 13:29:11 +0000 Subject: [PATCH] Enable preemptive authentication to avoid most 401 requests git-svn-id: http://svn.code.sf.net/p/davmail/code/trunk@280 3d1905a2-6b24-0410-a738-b14d5a86fcbd --- src/java/davmail/http/DavGatewayHttpClientFacade.java | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/src/java/davmail/http/DavGatewayHttpClientFacade.java b/src/java/davmail/http/DavGatewayHttpClientFacade.java index d92b4b7a..abf8de7f 100644 --- a/src/java/davmail/http/DavGatewayHttpClientFacade.java +++ b/src/java/davmail/http/DavGatewayHttpClientFacade.java @@ -3,14 +3,11 @@ package davmail.http; import davmail.Settings; import davmail.tray.DavGatewayTray; import org.apache.commons.httpclient.*; -import org.apache.commons.httpclient.util.URIUtil; import org.apache.commons.httpclient.methods.GetMethod; +import org.apache.commons.httpclient.util.URIUtil; import org.apache.webdav.lib.methods.SearchMethod; -import org.apache.webdav.lib.ResponseEntity; import java.io.IOException; -import java.util.List; -import java.util.ArrayList; import java.util.Enumeration; /** @@ -48,9 +45,6 @@ public final class DavGatewayHttpClientFacade { public static void configureClient(HttpClient httpClient) { httpClient.setHttpConnectionManager(multiThreadedHttpConnectionManager); - // do not send basic auth automatically - httpClient.getState().setAuthenticationPreemptive(false); - boolean enableProxy = Settings.getBooleanProperty("davmail.enableProxy"); String proxyHost = null; int proxyPort = 0;