Skip to content

feat(http/unstable): implement RFC 9651 Structured Field Values#6963

Merged
kt3k merged 12 commits intodenoland:mainfrom
tomas-zijdemans:rfc-9651
Feb 13, 2026
Merged

feat(http/unstable): implement RFC 9651 Structured Field Values#6963
kt3k merged 12 commits intodenoland:mainfrom
tomas-zijdemans:rfc-9651

Conversation

@tomas-zijdemans
Copy link
Contributor

Implements RFC-9651 parsing and serialization. RFC 9651 obsoletes RFC 8941 and is fully backwards compatible, adding support for Date and Display String types.

  • Single file implementation (like http/user_agent.ts)
  • Browser compatible
  • Matching RFC 9651 terminology as much as possible
  • Has all RFC 9651 types, including dates and display strings that extends RFC 8941
  • Official HTTPWG conformance test suite included in testdata/structured_fields/ (JSON files from https://github.com/httpwg/structured-field-tests)

@codecov
Copy link

codecov bot commented Jan 20, 2026

Codecov Report

❌ Patch coverage is 94.53015% with 39 lines in your changes missing coverage. Please review.
✅ Project coverage is 94.22%. Comparing base (823ee48) to head (b4acd4c).
⚠️ Report is 2 commits behind head on main.

Files with missing lines Patch % Lines
http/unstable_structured_fields.ts 94.53% 38 Missing and 1 partial ⚠️
Additional details and impacted files
@@           Coverage Diff            @@
##             main    #6963    +/-   ##
========================================
  Coverage   94.21%   94.22%            
========================================
  Files         615      616     +1     
  Lines       47840    48553   +713     
  Branches     8320     8527   +207     
========================================
+ Hits        45074    45749   +675     
- Misses       2699     2736    +37     
- Partials       67       68     +1     

☔ 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
Contributor Author

Test coverage is not 100%, this is due to defensive programming. In practise I would argue it's 100%.

Please advise if I need to address the patch test coverage.

@kt3k
Copy link
Member

kt3k commented Feb 12, 2026

We tend to avoid these type of prefixed names like SfItem, SfDate, etc (especially in public API names). How about removing these prefixes? (I personally think it's fine to make some conflicts with builtins such as String, Date)

@tomas-zijdemans
Copy link
Contributor Author

We tend to avoid these type of prefixed names like SfItem, SfDate, etc (especially in public API names). How about removing these prefixes? (I personally think it's fine to make some conflicts with builtins such as String, Date)

Thanks for the guidance, I was back and forth on this.

@tomas-zijdemans
Copy link
Contributor Author

tomas-zijdemans commented Feb 12, 2026

Ready for re-review

Copy link
Member

@kt3k kt3k left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM. Thank you!

@kt3k kt3k merged commit 54c6107 into denoland:main Feb 13, 2026
19 checks passed
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.

2 participants