Skip to content

fix: Parsing dictionary fields directly for key components - #200

Merged
dadrus merged 1 commit into
mainfrom
fix/key_field
Nov 7, 2026
Merged

dadrus merged 1 commit into
mainfrom
fix/key_field

Conversation

@dadrus

@dadrus dadrus commented Nov 7, 2026

Copy link
Copy Markdown
Owner

When selecting a Structured Fields Dictionary member using the key component parameter, the serializer previously attempted to parse the field as a List first.

For example, given the HTTP field:

X-Test: a

and the component identifier "x-test";key="a", the expected canonicalized value is ?1, since a represents a Boolean true Dictionary member. However, the List parser also accepts a, causing the serializer to incorrectly reject the field instead of producing the expected value.

This change parses the field directly as a Dictionary whenever the key parameter is present, as required by RFC 9421 Section 2.1.2. The existing parsing behavior for other Structured Fields remains unchanged.

@codecov

codecov Bot commented Nov 7, 2026 •

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 98.02%. Comparing base (ed3e595) to head (a758ac4).
⚠️ Report is 1 commits behind head on main.
✅ All tests successful. No failed tests found.

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #200      +/-   ##
==========================================
+ Coverage   97.97%   98.02%   +0.05%     
==========================================
  Files          23       23              
  Lines        1626     1624       -2     
==========================================
- Hits         1593     1592       -1     
+ Misses         33       32       -1     

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

@dadrus dadrus changed the title fix: Parsing dictionary fields directly for key components fix: Parsing dictionary fields directly for key components Nov 7, 2026
@dadrus
dadrus merged commit 8c7ee2d into main Nov 7, 2026
10 checks passed
@dadrus
dadrus deleted the fix/key_field branch November 7, 2026 17:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant