Browse Source

Use null stream in ReactorNettyClientResponse if no body is available

Closes gh-32805
pull/33047/head
Arjen Poutsma 2 years ago
parent
commit
6f32ff489a
  1. 2
      spring-web/src/main/java/org/springframework/http/client/ReactorNettyClientResponse.java

2
spring-web/src/main/java/org/springframework/http/client/ReactorNettyClientResponse.java

@ -88,7 +88,7 @@ final class ReactorNettyClientResponse implements ClientHttpResponse { @@ -88,7 +88,7 @@ final class ReactorNettyClientResponse implements ClientHttpResponse {
}
if (body == null) {
throw new IOException("Could not receive body");
body = InputStream.nullInputStream();
}
this.body = body;
return body;

Loading…
Cancel
Save