Skip to content

Commit 6f32ff4

Browse files
committed
Use null stream in ReactorNettyClientResponse if no body is available
Closes gh-32805
1 parent 24c8dfe commit 6f32ff4

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,7 @@ public InputStream getBody() throws IOException {
8888
}
8989

9090
if (body == null) {
91-
throw new IOException("Could not receive body");
91+
body = InputStream.nullInputStream();
9292
}
9393
this.body = body;
9494
return body;

0 commit comments

Comments
 (0)