Merge branch '6.1.x'
This commit is contained in:
@@ -192,7 +192,6 @@ class DefaultServerHttpRequestBuilder implements ServerHttpRequest.Builder {
|
||||
|
||||
private final ServerHttpRequest originalRequest;
|
||||
|
||||
|
||||
public MutatedServerHttpRequest(URI uri, @Nullable String contextPath,
|
||||
HttpMethod method, @Nullable SslInfo sslInfo, @Nullable InetSocketAddress remoteAddress,
|
||||
HttpHeaders headers, Flux<DataBuffer> body, ServerHttpRequest originalRequest) {
|
||||
@@ -232,7 +231,6 @@ class DefaultServerHttpRequestBuilder implements ServerHttpRequest.Builder {
|
||||
return this.body;
|
||||
}
|
||||
|
||||
@SuppressWarnings("unchecked")
|
||||
@Override
|
||||
public <T> T getNativeRequest() {
|
||||
return ServerHttpRequestDecorator.getNativeRequest(this.originalRequest);
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2002-2022 the original author or authors.
|
||||
* Copyright 2002-2024 the original author or authors.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
@@ -119,6 +119,11 @@ public class ServerHttpRequestDecorator implements ServerHttpRequest {
|
||||
return getDelegate().getBody();
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return getClass().getSimpleName() + " [delegate=" + getDelegate() + "]";
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Return the native request of the underlying server API, if possible,
|
||||
@@ -136,15 +141,8 @@ public class ServerHttpRequestDecorator implements ServerHttpRequest {
|
||||
return getNativeRequest(serverHttpRequestDecorator.getDelegate());
|
||||
}
|
||||
else {
|
||||
throw new IllegalArgumentException(
|
||||
"Can't find native request in " + request.getClass().getName());
|
||||
throw new IllegalArgumentException("Cannot find native request in " + request.getClass().getName());
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return getClass().getSimpleName() + " [delegate=" + getDelegate() + "]";
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user