Skip to content

Commit

Permalink
fix: xml response matching rules
Browse files Browse the repository at this point in the history
Matching rules were incorrectly being serialised to the request
body matching rules section.
  • Loading branch information
mefellows committed Mar 9, 2022
1 parent c5b96eb commit 13f7c36
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion rust/pact_ffi/src/mock_server/handles.rs
Original file line number Diff line number Diff line change
Expand Up @@ -745,7 +745,7 @@ pub extern fn pactffi_with_body(
OptionalBody::Present(Bytes::from(process_json(body.to_string(), category, &mut reqres.response.generators)),
Some("application/json".into()), None)
} else if reqres.response.content_type().unwrap_or_default().is_xml() {
let category = reqres.request.matching_rules.add_category("body");
let category = reqres.response.matching_rules.add_category("body");
OptionalBody::Present(Bytes::from(process_xml(body.to_string(), category, &mut reqres.response.generators).unwrap_or(vec![])),
Some("application/xml".into()), None)
} else {
Expand Down

0 comments on commit 13f7c36

Please sign in to comment.