Skip to content
Snippets Groups Projects
Commit ae236468 authored by Henry Borasch's avatar Henry Borasch
Browse files

978: ignore proxy configuration when it is "localhost/127.0.0.1:0"

parent 0d167410
No related branches found
No related tags found
1 merge request!169978: remove spring-web
This commit is part of merge request !169. Comments created here will be created in the context of that merge request.
...@@ -49,8 +49,14 @@ public class HttpClient { ...@@ -49,8 +49,14 @@ public class HttpClient {
} }
public HttpClient(boolean throwExceptionsOnFailure, List<Interceptor> interceptors, Proxy proxy) { public HttpClient(boolean throwExceptionsOnFailure, List<Interceptor> interceptors, Proxy proxy) {
LOGGER.info("Creating HttpClient with proxy configuration: {}", proxy);
this.httpClient = builderWithInterceptors(interceptors).proxy(proxy).build(); if (proxy.address().toString().equals("localhost/127.0.0.1:0")) {
LOGGER.info("Creating HttpClient without proxy configuration.");
this.httpClient = builderWithInterceptors(interceptors).build();
} else {
LOGGER.info("Creating HttpClient with proxy configuration: {}", proxy);
this.httpClient = builderWithInterceptors(interceptors).proxy(proxy).build();
}
this.throwExceptionsOnFailure = throwExceptionsOnFailure; this.throwExceptionsOnFailure = throwExceptionsOnFailure;
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment