Skip to content

RestTestClient returns null response body #35385

@rstoyanchev

Description

@rstoyanchev

DefaultResponseSpec decodes the body via methods on ExchangeResult that in turn delegate to the client response, and then creates an EntityExchangeResult with the decoded body. However, the methods on ExchangeResult are public can be called again even though the body can only be consumed once.

ExchangeResult needs to be updated to not expose any public getBody methods, which should only ever be done through the subclass EntityExchangeResult.

Metadata

Metadata

Assignees

Labels

in: testIssues in the test modulein: webIssues in web modules (web, webmvc, webflux, websocket)type: bugA general bug

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions