Skip to content

Require terminal zero framing for chunked HTTP bodies - #185

Open
kentbull wants to merge 1 commit into
ioflo:mainfrom
kentbull:fix/http-terminal-chunk-framing
Open

Require terminal zero framing for chunked HTTP bodies#185
kentbull wants to merge 1 commit into
ioflo:mainfrom
kentbull:fix/http-terminal-chunk-framing

Conversation

@kentbull

@kentbull kentbull commented Aug 28, 2026

Copy link
Copy Markdown
Contributor

What

  • Consume buffered chunk bytes before applying EOF in request and response parsers.
  • Continue parsing after every nonzero data chunk.
  • Require the terminal zero chunk and complete trailer framing.
  • Add regressions for complete framing, a missing terminal chunk, and incomplete trailers.

Why

Connection EOF is not valid chunked-body termination. Accepting it after a data chunk silently converts truncated HTTP messages into successful requests or responses.

Portability

This adapts GLEIF-IT#21 to current upstream main. It is independent of the open parser-generation, producer-settlement, and Responder-reuse PRs.

Fixes #184.

Consume buffered chunk bytes before applying EOF and continue after every nonzero data chunk. Require both request and response parsers to observe the terminal zero chunk and complete trailers before reporting body completion.
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.

Chunked HTTP parsers accept EOF without terminal zero framing

1 participant