mirror of
https://github.com/spring-projects/spring-boot.git
synced 2024-07-05 00:56:58 +08:00
Merge branch '3.3.x'
Closes gh-41235
This commit is contained in:
commit
f5eb6e95ce
|
@ -116,6 +116,8 @@ final class LocalHttpClientTransport extends HttpClientTransport {
|
|||
*/
|
||||
private static class LocalConnectionSocketFactory implements ConnectionSocketFactory {
|
||||
|
||||
private static final String NPIPE_PREFIX = "npipe://";
|
||||
|
||||
private final String host;
|
||||
|
||||
LocalConnectionSocketFactory(String host) {
|
||||
|
@ -124,10 +126,10 @@ final class LocalHttpClientTransport extends HttpClientTransport {
|
|||
|
||||
@Override
|
||||
public Socket createSocket(HttpContext context) throws IOException {
|
||||
if (Platform.isWindows()) {
|
||||
return NamedPipeSocket.get(this.host);
|
||||
if (this.host.startsWith(NPIPE_PREFIX)) {
|
||||
return NamedPipeSocket.get(this.host.substring(NPIPE_PREFIX.length()));
|
||||
}
|
||||
return DomainSocket.get(this.host);
|
||||
return (!Platform.isWindows()) ? DomainSocket.get(this.host) : NamedPipeSocket.get(this.host);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
Loading…
Reference in New Issue
Block a user