Skip to content

Reset response framing state on Responder reuse - #181

Open
kentbull wants to merge 1 commit into
ioflo:mainfrom
kentbull:fix/http-responder-reuse-state
Open

Reset response framing state on Responder reuse#181
kentbull wants to merge 1 commit into
ioflo:mainfrom
kentbull:fix/http-responder-reuse-state

Conversation

@kentbull

@kentbull kentbull commented Aug 28, 2026

Copy link
Copy Markdown
Contributor

What

  • Derive response chunkability from every parsed request, including responder reuse.
  • Apply the supplied chunkable value in Responder.reset().
  • Clear event-stream state when a responder is reset.
  • Add a regression test covering an HTTP/1.1 request after a prior SSE response on the same connection.

Why

Responder is connection-scoped but its framing and media-type decisions are request-scoped. Reusing it without resetting those fields can carry a prior response's state into the next response and produce incorrect HTTP framing.

Portability

This is a target-native port of GLEIF-IT#19. It does not depend on the still-open content-length producer-settlement PR.

Fixes #180.

Derive chunkability from each parsed request and pass it through both Responder creation and reuse. Reset event-stream state so one persistent response cannot leak its framing policy into the next.
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.

Responder reuse leaks request-scoped HTTP framing state

1 participant