Skip to content

Commit bc5a25b

Browse files
committed
Polish
1 parent 2b3c93f commit bc5a25b

File tree

2 files changed

+13
-3
lines changed

2 files changed

+13
-3
lines changed

spring-boot-project/spring-boot-tools/spring-boot-buildpack-platform/src/main/java/org/springframework/boot/buildpack/platform/docker/transport/LocalHttpClientTransport.java

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,9 @@
3333
import org.apache.hc.client5.http.io.DetachedSocketFactory;
3434
import org.apache.hc.client5.http.io.HttpClientConnectionManager;
3535
import org.apache.hc.client5.http.routing.HttpRoutePlanner;
36+
import org.apache.hc.client5.http.ssl.TlsSocketStrategy;
3637
import org.apache.hc.core5.http.HttpHost;
38+
import org.apache.hc.core5.http.config.Lookup;
3739
import org.apache.hc.core5.http.protocol.HttpContext;
3840
import org.apache.hc.core5.util.TimeValue;
3941

@@ -77,12 +79,20 @@ private static class LocalConnectionManager extends BasicHttpClientConnectionMan
7779
.setValidateAfterInactivity(TimeValue.NEG_ONE_MILLISECOND)
7880
.build();
7981

82+
private static final Lookup<TlsSocketStrategy> NO_TLS_SOCKET = (name) -> null;
83+
8084
LocalConnectionManager(ResolvedDockerHost dockerHost) {
81-
super(new DefaultHttpClientConnectionOperator(new LocalDetachedSocketFactory(dockerHost), null,
82-
new LocalDnsResolver(), (name) -> null), null);
85+
super(createhttpClientConnectionOperator(dockerHost), null);
8386
setConnectionConfig(CONNECTION_CONFIG);
8487
}
8588

89+
private static DefaultHttpClientConnectionOperator createhttpClientConnectionOperator(
90+
ResolvedDockerHost dockerHost) {
91+
LocalDetachedSocketFactory detachedSocketFactory = new LocalDetachedSocketFactory(dockerHost);
92+
LocalDnsResolver dnsResolver = new LocalDnsResolver();
93+
return new DefaultHttpClientConnectionOperator(detachedSocketFactory, null, dnsResolver, NO_TLS_SOCKET);
94+
}
95+
8696
}
8797

8898
/**

spring-boot-project/spring-boot-tools/spring-boot-buildpack-platform/src/main/java/org/springframework/boot/buildpack/platform/socket/NamedPipeSocket.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -128,8 +128,8 @@ public void failed(Throwable exc, A attachment) {
128128
}
129129
handler.failed(exc, attachment);
130130
}
131-
});
132131

132+
});
133133
}
134134

135135
@Override

0 commit comments

Comments
 (0)