Fix off-by-one error in PartEvent part count

This commit fixes an off-by-one error in the
PartEventHttpMessageReader,  so that it no longer counts empty windows.

Closes gh-32122
This commit is contained in:
Arjen Poutsma
2024-02-05 10:58:25 +01:00
parent 0fdf759896
commit c570f3b2da
2 changed files with 14 additions and 20 deletions

View File

@@ -238,6 +238,7 @@ class PartEventHttpMessageReaderTests {
Flux<PartEvent> result = reader.read(forClass(PartEvent.class), request, emptyMap());
StepVerifier.create(result)
.assertNext(form(headers -> assertThat(headers).isEmpty(), "This is implicitly typed plain ASCII text.\r\nIt does NOT end with a linebreak."))
.expectError(DecodingException.class)
.verify();
}