-
Notifications
You must be signed in to change notification settings - Fork 50
Open
Labels
bugIndicates an unexpected problem or unintended behaviorIndicates an unexpected problem or unintended behavior
Description
Summary
The parse_header function in pact_models/src/headers.rs incorrectly splits all unknown headers by comma. Custom headers containing JSON or other comma-separated data are broken into invalid fragments, causing verification failures.
Reproduction
Branch with reproduction tests: repro/issue-header-comma-split
Root Cause
In pact_models/src/headers.rs:30-33 - the logic is inverted:
- Current: Split everything except known single-value headers
- Should be: Split only known multi-value headers
Suggested Fix
Use MULTI_VALUE_HEADERS allowlist instead of SINGLE_VALUE_HEADERS blocklist, following the JVM implementation.
Related
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
bugIndicates an unexpected problem or unintended behaviorIndicates an unexpected problem or unintended behavior