Skip to content

fix(ffi): don't add a second Content-Type header when one is set in another case - #26

Open
YOU54F wants to merge 1 commit into
masterfrom
fix/ffi-with-body-content-type-case
Open

YOU54F wants to merge 1 commit into
masterfrom
fix/ffi-with-body-content-type-case

Conversation

@YOU54F

@YOU54F YOU54F commented Nov 9, 2026

Copy link
Copy Markdown
Owner

Commits

fix(ffi): don't add a second Content-Type header when one is set in another case

pactffi_with_body defaulted the Content-Type header with
headers.entry("Content-Type"), which is case-sensitive. A header set
earlier as content-type ended up in the pact twice, as Content-Type and
content-type. Use has_header (case-insensitive), as
pactffi_with_binary_body already does.

Fixes pact-foundation#302.

🤖 Generated with Claude Code

…nother case

pactffi_with_body defaulted the Content-Type header with
headers.entry("Content-Type"), which is case-sensitive. A header set
earlier as content-type ended up in the pact twice, as Content-Type and
content-type. Use has_header (case-insensitive), as
pactffi_with_binary_body already does.

Fixes pact-foundation#302.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
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.

Content-Type header expects duplicate values

1 participant