Skip to content

feat(http/unstable): add RFC 9530 digest fields#7037

Open
tomas-zijdemans wants to merge 8 commits intodenoland:mainfrom
tomas-zijdemans:digest-fields
Open

feat(http/unstable): add RFC 9530 digest fields#7037
tomas-zijdemans wants to merge 8 commits intodenoland:mainfrom
tomas-zijdemans:digest-fields

Conversation

@tomas-zijdemans
Copy link
Copy Markdown
Contributor

@tomas-zijdemans tomas-zijdemans commented Mar 9, 2026

Adds an unstable @std/http/unstable-digest-fields module for creating and verifying RFC 9530 Content-Digest and Repr-Digest field values.

RFC 9530, an IETF standards-track RFC from Feb 2024, replaces the legacy RFC 3230 Digest field with Structured Fields based digest headers for HTTP content and representation integrity. These helpers support creating digest values from strings, bytes, or streams, and verifying Request / Response bodies without consuming the original body.

This is also useful with HTTP Message Signatures (RFC 9421), where a signed digest field can bind the signature to the message body. The implementation is small and browser-compatible, reusing existing @std primitives: timing-safe-equal, unstable-structured-fields, and to-bytes.

@tomas-zijdemans tomas-zijdemans requested a review from kt3k as a code owner March 9, 2026 13:33
@github-actions github-actions Bot added the http label Mar 9, 2026
@codecov
Copy link
Copy Markdown

codecov Bot commented Mar 9, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 94.62%. Comparing base (cd03740) to head (b0e16b6).

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #7037      +/-   ##
==========================================
+ Coverage   94.61%   94.62%   +0.01%     
==========================================
  Files         634      635       +1     
  Lines       51799    51944     +145     
  Branches     9329     9361      +32     
==========================================
+ Hits        49009    49154     +145     
  Misses       2216     2216              
  Partials      574      574              

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@tomas-zijdemans
Copy link
Copy Markdown
Contributor Author

Updated to use the stable toBytes

@tomas-zijdemans
Copy link
Copy Markdown
Contributor Author

Parsing has been hardened and docs improved. Ready for review @bartlomieju

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

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant