When remote service responses with Content-Type that can't be read by HttpMessageReader, an instance of UnsupportedMediaTypeException is being thrown (see BodyExtractors.readWithMessageReaders()). But ClientResponse's body is being ignored in this case.
Denys Ivano opened SPR-17054 and commented
When remote service responses with
Content-Type
that can't be read byHttpMessageReader
, an instance ofUnsupportedMediaTypeException
is being thrown (seeBodyExtractors.readWithMessageReaders()
). ButClientResponse
's body is being ignored in this case.From
ClientResponse
's Javadoc:So in order to release resources and avoid potential issues with HTTP connection pool, the response body must be consumed.
I've created a test that reproduces this issue:
Issue Links:
Referenced from: commits a410d90, d0ada56
The text was updated successfully, but these errors were encountered: