Skip to content

Preserve HTTP/1 field spelling without weakening validation - #124

Closed
proggeramlug wants to merge 1 commit into
codex/wasi-datagram-adapterfrom
codex/wasi-http-field-case-20261023
Closed

proggeramlug wants to merge 1 commit into
codex/wasi-datagram-adapterfrom
codex/wasi-http-field-case-20261023

Conversation

@proggeramlug

Copy link
Copy Markdown
Contributor

HTTP/1 decoding currently lowercases every field name, so a WASI 0.3 HTTP host cannot preserve original field spelling through fields.copy-all or forwarding. Preserve parsed names and add Header::new_preserving_case for HTTP/1 serialization. The existing constructor keeps its lowercase behavior for compatibility with HTTP/2 callers.

Keep Host counting and forbidden-trailer validation case-insensitive. Regression coverage checks exact header/trailer round trips, interleaved repeated fields, mixed-case duplicate Host rejection, and mixed-case forbidden trailers on both decoding and encoding.

Validation on Linux: 93 local HTTP tests passed (three external tests initially ignored); the separate required-fixture run passed all 21 asynchronous and nine interoperability tests with zero ignored. All-target/all-feature HTTP Clippy, path validation and feature-mode checks passed. Perry's downstream P3 provider passed 276 development and 276 production panic-abort tests with the codec fix. The full repository/platform matrix is left to CI.

Stacked on #123 to retain the shared provider-validation dependency snapshot. Kept draft until the broader Perry WASI integration is qualified.

@coderabbitai

coderabbitai Bot commented Oct 23, 2026

Copy link
Copy Markdown

Important

Draft PR not reviewed

Draft PRs are not automatically reviewed by default.

  • Trigger a manual review

To automatically review draft PRs, update your CodeRabbit configuration:

reviews:
  auto_review:
    drafts: true
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@proggeramlug
proggeramlug force-pushed the codex/wasi-http-field-case-20261023 branch from d62add8 to 9589d1d Compare October 23, 2026 18:50
@proggeramlug
proggeramlug force-pushed the codex/wasi-datagram-adapter branch from b63a4ee to 8d1c608 Compare October 23, 2026 18:50
proggeramlug added a commit that referenced this pull request Nov 8, 2026
…amed SETTINGS and PING

- Header::new_preserving_case: HTTP/1 keeps the field and trailer name
  spelling the caller gave, without weakening validation.
- HTTP/2 SETTINGS carry only the options the caller named, and any
  HEADER_TABLE_SIZE the peer advertises is honoured (hpack set_allowed).
- PUSH_PROMISE is handled in the core; promised stream ids are validated.
- SETTINGS and PING acknowledgements report what they measured; ping()
  validates its arguments, and an unsolicited PING acknowledgement is an
  INTERNAL_ERROR.

Supersedes #124.
proggeramlug added a commit that referenced this pull request Nov 8, 2026
…amed SETTINGS and PING

- Header::new_preserving_case: HTTP/1 keeps the field and trailer name
  spelling the caller gave, without weakening validation.
- HTTP/2 SETTINGS carry only the options the caller named, and any
  HEADER_TABLE_SIZE the peer advertises is honoured (hpack set_allowed).
- PUSH_PROMISE is handled in the core; promised stream ids are validated.
- SETTINGS and PING acknowledgements report what they measured; ping()
  validates its arguments, and an unsolicited PING acknowledgement is an
  INTERNAL_ERROR.

Supersedes #124.
@proggeramlug

Copy link
Copy Markdown
Contributor Author

Superseded by #131, which upstreams all of Perry's provider repairs (merged).

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.

1 participant