diff --git a/spring-boot-project/spring-boot-tools/spring-boot-buildpack-platform/src/main/java/org/springframework/boot/buildpack/platform/docker/transport/LocalHttpClientTransport.java b/spring-boot-project/spring-boot-tools/spring-boot-buildpack-platform/src/main/java/org/springframework/boot/buildpack/platform/docker/transport/LocalHttpClientTransport.java index 67ac077ea0..7f99a33904 100644 --- a/spring-boot-project/spring-boot-tools/spring-boot-buildpack-platform/src/main/java/org/springframework/boot/buildpack/platform/docker/transport/LocalHttpClientTransport.java +++ b/spring-boot-project/spring-boot-tools/spring-boot-buildpack-platform/src/main/java/org/springframework/boot/buildpack/platform/docker/transport/LocalHttpClientTransport.java @@ -33,7 +33,9 @@ import org.apache.hc.client5.http.impl.io.DefaultHttpClientConnectionOperator; import org.apache.hc.client5.http.io.DetachedSocketFactory; import org.apache.hc.client5.http.io.HttpClientConnectionManager; import org.apache.hc.client5.http.routing.HttpRoutePlanner; +import org.apache.hc.client5.http.ssl.TlsSocketStrategy; import org.apache.hc.core5.http.HttpHost; +import org.apache.hc.core5.http.config.Lookup; import org.apache.hc.core5.http.protocol.HttpContext; import org.apache.hc.core5.util.TimeValue; @@ -77,12 +79,20 @@ final class LocalHttpClientTransport extends HttpClientTransport { .setValidateAfterInactivity(TimeValue.NEG_ONE_MILLISECOND) .build(); + private static final Lookup NO_TLS_SOCKET = (name) -> null; + LocalConnectionManager(ResolvedDockerHost dockerHost) { - super(new DefaultHttpClientConnectionOperator(new LocalDetachedSocketFactory(dockerHost), null, - new LocalDnsResolver(), (name) -> null), null); + super(createhttpClientConnectionOperator(dockerHost), null); setConnectionConfig(CONNECTION_CONFIG); } + private static DefaultHttpClientConnectionOperator createhttpClientConnectionOperator( + ResolvedDockerHost dockerHost) { + LocalDetachedSocketFactory detachedSocketFactory = new LocalDetachedSocketFactory(dockerHost); + LocalDnsResolver dnsResolver = new LocalDnsResolver(); + return new DefaultHttpClientConnectionOperator(detachedSocketFactory, null, dnsResolver, NO_TLS_SOCKET); + } + } /** diff --git a/spring-boot-project/spring-boot-tools/spring-boot-buildpack-platform/src/main/java/org/springframework/boot/buildpack/platform/socket/NamedPipeSocket.java b/spring-boot-project/spring-boot-tools/spring-boot-buildpack-platform/src/main/java/org/springframework/boot/buildpack/platform/socket/NamedPipeSocket.java index 462b9d4de3..f68fa3cb91 100644 --- a/spring-boot-project/spring-boot-tools/spring-boot-buildpack-platform/src/main/java/org/springframework/boot/buildpack/platform/socket/NamedPipeSocket.java +++ b/spring-boot-project/spring-boot-tools/spring-boot-buildpack-platform/src/main/java/org/springframework/boot/buildpack/platform/socket/NamedPipeSocket.java @@ -128,8 +128,8 @@ public class NamedPipeSocket extends Socket { } handler.failed(exc, attachment); } - }); + }); } @Override