Skip to content

Support multiple interim responses - #6

Merged
aryan-25 merged 4 commits into
apple:mainfrom
aryan-25:support-multiple-informational-responses
Jul 1, 2026
Merged

Support multiple interim responses#6
aryan-25 merged 4 commits into
apple:mainfrom
aryan-25:support-multiple-informational-responses

Conversation

@aryan-25

@aryan-25 aryan-25 commented Jun 29, 2026

Copy link
Copy Markdown
Collaborator

Motivation

Per RFC 9110 §15.2 and RFC 9114 §4.1, servers may send zero or more interim responses (1xx status code) prior to the final response, and clients MUST be able to parse one or more interim responses prior to the final response.

There are two bugs in our current implementation:

  • HTTP3FrameValidator.RequestStreamValidator currently only allows sending/receiving multiple 100 Continue interim responses. All other 1xx interim responses can only be sent/received once.
  • HTTPMessageParsingStateMachine does not handle multiple interim responses. Every HEADERS frame is treated as the final response head.

Modifications

  • Updated HTTP3FrameValidator.RequestStreamValidator and HTTPMessageParsingStateMachine to support multiple interim responses with any 1xx status code.

  • Added associated tests.

Result

Servers can now send, and clients can now parse, any number of 1xx interim responses preceding the final response.

Motivation:

Per [RFC 9110 §15.2](https://www.rfc-editor.org/rfc/rfc9110.html#section-15.2) and [RFC 9114 §4.1](https://www.rfc-editor.org/rfc/rfc9114.html#section-4.1), servers may send zero or more informational responses (1xx status code) prior to the final response, and clients MUST be able to parse one or more informational responses prior to the final response.

There are two bugs in our current implementation:
- `HTTP3FrameValidator.RequestStreamValidator` currently only allows sending/receiving multiple `100 Continue` informational responses. All other 1xx informational responses can only be sent/received once.
- `HTTPMessageParsingStateMachine` does not handle multiple informational responses. Every HEADERS frame is treated as the final response head.

Modifications:

- Updated `HTTP3FrameValidator`'s `RequestStreamValidator` and `HTTPMessageParsingStateMachine` to allow multiple informational responses with any 1xx status code to be sent/received.

- Added associated tests.

Result:

Servers can now send, and clients can now parse, any number of 1xx informational responses (with any 1xx status code) preceding the final response.
@aryan-25 aryan-25 added the 🔨 semver/patch No public API change. label Jun 29, 2026
Comment thread Sources/HTTP3/HTTP3Frame.swift
@aryan-25 aryan-25 changed the title Support multiple informational responses Support multiple interim responses Jun 29, 2026
@aryan-25
aryan-25 merged commit 54e5fc5 into apple:main Jul 1, 2026
52 of 57 checks passed
@aryan-25
aryan-25 deleted the support-multiple-informational-responses branch July 1, 2026 14:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

🔨 semver/patch No public API change.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants