Skip to content

HTTPCORE-803: Fix premature termination of incomplete chunked messages - #744

Merged
arturobernalg merged 1 commit into
apache:masterfrom
arturobernalg:HTTPCORE-803
Nov 10, 2026
Merged

arturobernalg merged 1 commit into
apache:masterfrom
arturobernalg:HTTPCORE-803

Conversation

@arturobernalg

Copy link
Copy Markdown
Member

Fix HTTPCORE-803: incomplete chunked messages could be incorrectly terminated when entity serialization failed.

Previously, closing the chunked output stream after a failed write could emit the terminating chunk, making an incomplete message appear complete to the receiving endpoint.

The change prevents normal completion of the transfer codec after a write failure and closes inconsistent connections.

The existing handling of ResponseOutOfOrderException is preserved, allowing early server responses to be processed correctly.

@arturobernalg
arturobernalg requested a review from ok2c November 9, 2026 12:36
@abutkiewicz-eng

Copy link
Copy Markdown

Looks good to me, thank you. Confirmed it fixes my scenario where this problem appeared.

Prevent chunked transfer codecs from writing the terminating
chunk when entity serialization fails.

Preserve early response handling and close inconsistent
connections after write failures.
@arturobernalg
arturobernalg merged commit efb46e4 into apache:master Nov 10, 2026
12 checks passed
@arturobernalg

Copy link
Copy Markdown
Member Author

Cherry-picked to 5.4.x

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants