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
{{ message }}
Repository navigation
RFC 7252: validate known option lengths and unknown critical options #28
The current raw codec must remain distinct from an endpoint's supported-option policy. Source review found Option.IsCritical uses (number & 1) > 1, always false, and a five-byte Content-Format integer can truncate to 50 rather than follow RFC7252 §5.4.3. Track this separately from syntactic decoder fixes (#20) and registry compatibility (#23).
Acceptance: define an explicit supported-option registry based on real handlers (Enum.IsDefined is insufficient); apply RFC7252 §5.4 and §5.5.2 to unknown/invalid critical options (4.02 for requests, reject/ignore responses as prescribed), preserve/ignore elective options correctly, validate known option lengths/repetition and integer bounds, and provide an extension hook for host-specific options without treating every IANA entry as implemented. Test illegal Accept/Uri-Port/Content-Format/Observe/Block lengths, duplicates, raw proxies and legacy option19. A raw decode/encode round trip alone does not complete endpoint semantic validation.
Partial progress merged in PR #32 / 557b31a: Option.IsCritical now follows the RFC7252 odd/even bit rule, protected by 12 classification cases. The final combined suite passed 258/258 on Windows and Linux. This does not complete this issue: known-option lengths/repetition/integer bounds, supported-handler registration and unknown critical/elective endpoint policy remain unimplemented. Keep OPEN; the separate option19 compatibility decision stays in #23.
Activity
maikebing commentedon Nov 12, 2026
Partial progress merged in PR #32 / 557b31a: Option.IsCritical now follows the RFC7252 odd/even bit rule, protected by 12 classification cases. The final combined suite passed 258/258 on Windows and Linux. This does not complete this issue: known-option lengths/repetition/integer bounds, supported-handler registration and unknown critical/elective endpoint policy remain unimplemented. Keep OPEN; the separate option19 compatibility decision stays in #23.