Merge branch '6.2.x'

This commit is contained in:
rstoyanchev
2025-10-28 12:07:46 +00:00
@@ -67,7 +67,12 @@ class JdkClientHttpResponse extends AbstractClientHttpResponse {
private static Flux<DataBuffer> adaptBody(
HttpResponse<Flow.Publisher<List<ByteBuffer>>> response, DataBufferFactory bufferFactory) {
return JdkFlowAdapter.flowPublisherToFlux(response.body())
Flow.Publisher<List<ByteBuffer>> body = response.body();
if (body == null) {
return Flux.empty();
}
return JdkFlowAdapter.flowPublisherToFlux(body)
.flatMapIterable(Function.identity())
.map(bufferFactory::wrap)
.doOnDiscard(DataBuffer.class, DataBufferUtils::release)