Closed
Description
Juergen Hoeller opened SPR-13563 and commented
Initiated by #886, we should clarify whether HttpInputMessage.getBody()
is allowed to return null
, in particular for ClientHttpResponse
implementations. BufferingClientHttpResponseWrapper
should then defensively check for a null
body before trying to buffer it into a byte array, or we should enforce non-null
body values where they can currently be null
: specifically, in HttpComponents(Async)ClientHttpResponse
which seems to be the only implementation that currently returns null
for an empty body to begin with.
Affects: 3.2.14, 4.1.7, 4.2.1