Closed gruntster closed 1 year ago
Thanks for this.
Maintainer notes:
This looks like bug on the JS side. The rust core supports multiple values for a header, but currently that is not exposed to the user.
It looks like on the response side of the check, rust is clever enough to split the header value parts and test each of them. But on the consumer side, it doesn't split the header value (e.g. via the presence of a ,
into its constituent parts) and this might be the cause of the issue.
@mefellows This issue is still present in pact 10.4.0. Would it be possible for this to be reopened please?
Thanks. Yes, I only added support to the V3 (PactV3
) and (new beta PactV4
) V4 interface, but we need to add it to the Pact
.
UPDATE: this comment was incorrect, it was added to all types, however the bug is present in the core
👋 Hi! The 'smartbear-supported' label has just been added to this issue, which will create an internal tracking ticket in PactFlow's Jira (PACT-848). We will use this to prioritise and assign a team member to this task. All activity will be public on this ticket. For now, sit tight and we'll update this ticket once we have more information on the next steps.
See our documentation for more information.
After further investigation, the upstream issue is actually https://github.com/pact-foundation/pact-reference/issues/300.
The latest Pact JS (via pact-core
dependency) should address this. Closing.
Software versions
Issue Checklist
Please confirm the following:
Expected behaviour
A multi-value header is matched against the multi-value header of the registered Interaction (v2). Substituting the Pact library with version 9.18.1 works as expected.
Actual behaviour
A multi-value header of the actual request appears to be processed as a single value that is a combination of all values. A multi-value header of the expected request is processed as the first value only.
Steps to reproduce
package.json
test.ts
Steps
npm i
npx ts-node test.ts
Relevant log files
test.txt