Repository navigation
Conversation
… content type When the actual request or response has no Content-Type header, its content type is only a guess from the body bytes (the mock server stores that guess on the body). Compare the body using the expected content type instead of reporting a BodyTypeMismatch, so a binary body sent without a header can match an expected application/octet-stream body. Refs pact-foundation/pact-go#263 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Removes a header (case-insensitively) from the request or response of an interaction, along with its matching rules and generators. This lets a wrapper drop the Content-Type header that pactffi_with_body and pactffi_with_binary_body add by default, while the body keeps its content type. Before V4 the body has nowhere else to record its type, so removing Content-Type from a part with a non-text body is refused. Refs pact-foundation/pact-go#263 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
… and received requests Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The steps run the scenarios in YOU54F/pact-compatibility-suite#2. CI runs against the vendored suite copy, which doesn't include those scenarios yet.
Commits
fix(matching): don't report a body type mismatch for a sniffed actual content type
When the actual request or response has no Content-Type header, its content
type is only a guess from the body bytes (the mock server stores that guess on
the body). Compare the body using the expected content type instead of
reporting a BodyTypeMismatch, so a binary body sent without a header can
match an expected application/octet-stream body.
Refs pact-foundation/pact-go#263
feat(ffi): add pactffi_remove_header to remove a header and its rules
Removes a header (case-insensitively) from the request or response of an
interaction, along with its matching rules and generators. This lets a
wrapper drop the Content-Type header that pactffi_with_body and
pactffi_with_binary_body add by default, while the body keeps its content
type. Before V4 the body has nowhere else to record its type, so removing
Content-Type from a part with a non-text body is refused.
Refs pact-foundation/pact-go#263
test(compatibility-suite): steps to remove a header from the expected and received requests
🤖 Generated with Claude Code