denoland / denoland/std

proposal(http/unstable): support RFC 9530 Want-Content-Digest / Want-Repr-Digest fields

Open
#7,266 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
TypeScript
Stars
3.6k
Forks
681
PR merge metrics
No merged PRs in 30d

Description

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

RFC 9530 §4 also defines the `Want-Content-Digest` and `Want-Repr-Digest` fields, which let a sender express a preference for which digest algorithms the peer should use (as an Integer Preference dictionary, e.g. `Want-Repr-Digest: sha-512=3, sha-256=10`). These were deliberately scoped out of #7238 to keep the initial module small.

This issue tracks adding helpers for creating and parsing the two `Want-*` fields, e.g.:

- serializing an algorithm-preference map to a field value
- parsing a received field value into an ordered preference list, ignoring unsupported algorithms per the RFC

Raised in review: https://github.com/denoland/std/pull/7238#discussion_r3681734720

Contributor guide

Open the contributing guide

Research direction

Start by reading the existing @std/http/unstable-digest-fields module from #7238 and RFC 9530 §4. Trace how the current helpers create and verify digest fields, then define the corresponding Want-* serialization and parsing behavior, including ordered preferences and unsupported algorithms. Done means both fields are supported with behavior matching the RFC.

Written by the indexing model from the issue text.

Assessment

Tech stack
typescript
Domain
backend-api-design
Issue type
Feature
Difficulty
3/5
Estimated time
1-2 days
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
66/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.