implemented authorization via http proxy
This commit is contained in:
parent
378c8aaddc
commit
b9c32c55d8
@ -63,22 +63,7 @@ public abstract class DefaultAbsSender extends AbsSender {
|
||||
this.exe = Executors.newFixedThreadPool(options.getMaxThreads());
|
||||
this.options = options;
|
||||
|
||||
if (options.getCredentialsProvider() != null) {
|
||||
httpclient = HttpClientBuilder.create()
|
||||
.setProxy(options.getHttpProxy())
|
||||
.setProxyAuthenticationStrategy(new ProxyAuthenticationStrategy())
|
||||
.setDefaultCredentialsProvider(options.getCredentialsProvider())
|
||||
.setSSLHostnameVerifier(new NoopHostnameVerifier())
|
||||
.setConnectionTimeToLive(70, TimeUnit.SECONDS)
|
||||
.setMaxConnTotal(100)
|
||||
.build();
|
||||
} else {
|
||||
httpclient = HttpClientBuilder.create()
|
||||
.setSSLHostnameVerifier(new NoopHostnameVerifier())
|
||||
.setConnectionTimeToLive(70, TimeUnit.SECONDS)
|
||||
.setMaxConnTotal(100)
|
||||
.build();
|
||||
}
|
||||
httpclient = createHttpClient();
|
||||
|
||||
requestConfig = options.getRequestConfig();
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user