From abf14232e226be1a2109c0586b64058010d5d0ba Mon Sep 17 00:00:00 2001 From: Yousaf Nabi Date: Tue, 12 Nov 2024 23:57:56 +0000 Subject: [PATCH 1/2] fix(verifier): add Accept-Charset=utf8 header when post/put Fixes 406 Not Acceptable on publishing verification results, when using a pact broker started with thin. (puma / webrick do not exhibit the issue --- rust/pact_verifier/src/pact_broker.rs | 1 + 1 file changed, 1 insertion(+) diff --git a/rust/pact_verifier/src/pact_broker.rs b/rust/pact_verifier/src/pact_broker.rs index 12f561fa..e50e5e17 100644 --- a/rust/pact_verifier/src/pact_broker.rs +++ b/rust/pact_verifier/src/pact_broker.rs @@ -495,6 +495,7 @@ impl HALClient { .header("Content-Type", "application/json") .header("Accept", "application/hal+json") .header("Accept", "application/json") + .header("Accept-Charset", "utf-8") .body(body.to_string()); let response = with_retries(self.retries, request_builder).await; From 345dc492b9904b30d714388fb2b53b8357d3a8ab Mon Sep 17 00:00:00 2001 From: Ronald Holshausen Date: Thu, 28 Nov 2024 09:56:49 +1100 Subject: [PATCH 2/2] chore(compatibility-suite): Update mock server dependency --- compatibility-suite/Cargo.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/compatibility-suite/Cargo.toml b/compatibility-suite/Cargo.toml index 0728b186..fa9a348f 100644 --- a/compatibility-suite/Cargo.toml +++ b/compatibility-suite/Cargo.toml @@ -15,7 +15,7 @@ lazy_static = "1.4.0" maplit = "1.0.2" pact_models = { version = "~1.2.5" } pact_matching = { version = "1.2.6", path = "../rust/pact_matching" } -pact_mock_server = { version = "1.2.9" } +pact_mock_server = { version = "1.2.10" } pact_verifier = { version = "1.2.4", path = "../rust/pact_verifier" } pact_consumer = { version = "1.2.3", path = "../rust/pact_consumer" } pretty_assertions = "1.4.0"