From: <rb...@us...> - 2016-07-30 15:27:48
|
Revision: 12889 http://sourceforge.net/p/htmlunit/code/12889 Author: rbri Date: 2016-07-30 15:27:46 +0000 (Sat, 30 Jul 2016) Log Message: ----------- code cleanup Modified Paths: -------------- trunk/htmlunit/src/main/java/com/gargoylesoftware/htmlunit/HttpWebConnection.java Modified: trunk/htmlunit/src/main/java/com/gargoylesoftware/htmlunit/HttpWebConnection.java =================================================================== --- trunk/htmlunit/src/main/java/com/gargoylesoftware/htmlunit/HttpWebConnection.java 2016-07-29 19:06:11 UTC (rev 12888) +++ trunk/htmlunit/src/main/java/com/gargoylesoftware/htmlunit/HttpWebConnection.java 2016-07-30 15:27:46 UTC (rev 12889) @@ -131,7 +131,7 @@ private static final String HACKED_COOKIE_POLICY = "mine"; - // have one per thread because this is (re)configured for every call (see configureHttpProcessor) + // have one per thread because this is (re)configured for every call (see configureHttpProcessorBuilder) private ThreadLocal<HttpClientBuilder> httpClientBuilder_ = new ThreadLocal<>(); private final WebClient webClient_; @@ -934,8 +934,6 @@ * but with the ability to configure {@code socketFactory}. */ private static PoolingHttpClientConnectionManager createConnectionManager(final HttpClientBuilder builder) { - final ConnectionSocketFactory socketFactory = new SocksConnectionSocketFactory(); - try { PublicSuffixMatcher publicSuffixMatcher = getField(builder, "publicSuffixMatcher"); if (publicSuffixMatcher == null) { @@ -987,7 +985,7 @@ final PoolingHttpClientConnectionManager poolingmgr = new PoolingHttpClientConnectionManager( RegistryBuilder.<ConnectionSocketFactory>create() - .register("http", socketFactory) + .register("http", new SocksConnectionSocketFactory()) .register("https", sslSocketFactory) .build(), null, |