Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

BufferClosedException when decoding to Flux in StringDecoder #29119

Closed
rstoyanchev opened this issue Sep 9, 2022 · 0 comments
Closed

BufferClosedException when decoding to Flux in StringDecoder #29119

rstoyanchev opened this issue Sep 9, 2022 · 0 comments
Assignees
Labels
in: web Issues in web modules (web, webmvc, webflux, websocket) type: bug A general bug
Milestone

Comments

@rstoyanchev
Copy link
Contributor

rstoyanchev commented Sep 9, 2022

Following the upgrade to Netty 5 in #28847, there is one remaining WebFlux test that fails.

The test case is a 500 error, suppressed with a status handler, so the response body is decoded as normal. However, it appears to not be related to the suppressed status. It can be reproduced with a normal response decoded to Flux<String>.

// WebClientIntegrationTests

@Test
void retrieveTextDecodedToFlux() {

	ReactorNetty2ClientHttpConnector connector = new ReactorNetty2ClientHttpConnector();
	startServer(connector);

	prepareResponse(response -> response
			.setHeader("Content-Type", "text/plain")
			.setBody("Hey now"));

	Flux<String> result = this.webClient.get()
			.uri("/")
			.accept(MediaType.TEXT_PLAIN)
			.retrieve()
			.bodyToFlux(String.class);

	StepVerifier.create(result)
			.expectNext("Hey now")
			.expectComplete()
			.verify(Duration.ofSeconds(3));
}

StringDecoder has a more advanced buffer manipulation when decoding for Flux. This is most likely related to the changes in #28874.

@rstoyanchev rstoyanchev added in: web Issues in web modules (web, webmvc, webflux, websocket) type: bug A general bug labels Sep 9, 2022
@rstoyanchev rstoyanchev added this to the 6.0.0-M6 milestone Sep 9, 2022
@poutsma poutsma self-assigned this Sep 12, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
in: web Issues in web modules (web, webmvc, webflux, websocket) type: bug A general bug
Projects
None yet
Development

No branches or pull requests

2 participants