Skip to content

docs: document case-sensitive body matching introduced in v0.8.0 - #298

Merged
alexliesenfeld merged 1 commit into
masterfrom
docs/224-body-matcher-case-sensitivity
Sep 2, 2026
Merged

alexliesenfeld merged 1 commit into
masterfrom
docs/224-body-matcher-case-sensitivity

Conversation

@alexliesenfeld

Copy link
Copy Markdown
Member

Fixes #224.

The When::body matcher performed a case-insensitive string comparison up to and including v0.7. Since v0.8.0, it compares the request body byte-by-byte and is therefore case-sensitive. This was an undocumented breaking change that caused tests relying on case-insensitive matching to fail after upgrading.

As discussed in the issue, the byte-level matching is the preferred behavior, so this PR keeps it and documents the change instead:

  • Adds a BREAKING CHANGES note to the v0.8.0 section of the changelog (which previously stated "No breaking changes expected").
  • Clarifies in the When::body and When::body_not documentation that the comparison is byte-level and case-sensitive, including a note about the behavior change between v0.7 and v0.8. The website documentation is generated from these doc comments and picks this up automatically.
  • Adds a regression test (body_case_sensitive) pinning the case-sensitive behavior.

The When::body matcher performed a case-insensitive string comparison up
to and including v0.7. Since v0.8.0 it compares the request body
byte-by-byte and is therefore case-sensitive. This was an undocumented
breaking change.

- Add a breaking changes note to the v0.8.0 changelog section
- Clarify byte-level, case-sensitive comparison in the When::body and
  When::body_not documentation
- Add a regression test pinning the case-sensitive behavior
@codecov

codecov Bot commented Sep 2, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.

📢 Thoughts on this report? Let us know!

@alexliesenfeld
alexliesenfeld merged commit 8b85a48 into master Sep 2, 2026
14 of 15 checks passed
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.

Body matcher is no longer case insensitive

1 participant