You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
A7. ETagValue refactor. Tighten the existing type: validate etagc charset, stop stripping internal ", weak flag preserved.
A8. ParameterValue (token / quoted-string choice). Uses A1 for the token form and A2 for the quoted-string form.
Out of scope here
MailboxAddress (RFC 5322) is deferred. from_header.dart will stay String-typed for now and the singleton-vs-list bug gets fixed without introducing a structured mailbox type.
All per-header fixes. Those land as separate commits in Phase B and onward, ticking boxes on the Overhaul typed header parsers #113 audit comment.
Notes for reviewers
These primitives are zero-cost where possible (Dart extension types) and abstract interface class for Token so closed-enum headers can implement Token without losing their enum nature.
Each primitive is independently mergeable. Order above is only the recommended landing order; later items don't strictly block earlier ones except where noted.
Sub-issue of #113 covering Phase A of the typed-header overhaul: the shared value-type scaffolding that the per-header fixes will build on.
See the audit comment on #113 for the full plan and the per-header checklist.
Scope
One commit per primitive, in dependency order. Each commit ships with unit tests and no behavioral changes to existing typed headers.
Tokenabstract interface class. tchar validation per RFC 9110 5.6.2, ASCII case-insensitive equality, sf-token serialization helper.HeaderScannerprimitive. Shared tokenizer with tchar reader, quoted-string reader (withquoted-pair), OWS skip, comma-list iterator, semicolon-param iterator. Replaces thesplitTrimAndFilterUnique/split(';q=')/split('=')family that header parsers reach for today. Closes Improve HTTP header parsing to handle quoted strings with delimiters #102.DeltaSeconds. Non-negative integer with validation, formatting, and a digit-only parse helper.Host.uri-hostplus optional explicit port (port absent is distinct from port=default). Factory fromUrithat respectshasPort.Origin. Built onHost+ scheme. Explicitnullsentinel as a distinct case. Strict construction (no path/query/fragment).LanguageTag(BCP 47). Extlang, script, variant, extension, private-use, grandfathered. Canonical casing on output.ETagValuerefactor. Tighten the existing type: validateetagccharset, stop stripping internal", weak flag preserved.ParameterValue(token / quoted-stringchoice). Uses A1 for the token form and A2 for the quoted-string form.Out of scope here
MailboxAddress(RFC 5322) is deferred.from_header.dartwill stayString-typed for now and the singleton-vs-list bug gets fixed without introducing a structured mailbox type.Notes for reviewers
abstract interface classforTokenso closed-enum headers canimplement Tokenwithout losing their enum nature.