mirror of
https://github.com/wiremock/WireMock.Net.git
synced 2026-01-11 14:20:29 +01:00
Issue: Params does not work, when there are multiple values for a key #76
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @raghavendrabankapur on GitHub (Mar 9, 2018).
Originally assigned to: @StefH on GitHub.
For a request in the Param's, if we have multiple values for a key, we are not able to match the score for that request and return 410 saying could not find the mapping.
In a request for a query string parameter, we can have only one value. But in the structure, we are allowing an array of values that can be passed. That means for that key, it can be anything among the passed values.
example
here in params, we have the key "searched" and values being "test" and "test2". Now my request can be like
http://localhost:9092/xyz?searched=test
http://localhost:9092/xyz?searched=test2
We can have either of them. But we cannot have like http://localhost:9092/xyz?searched=test1,test2
In this case, in the RequestMessageParamMatcher.cs file, we are deciding the score based on the count of values. Ideally, this should have been done if the list contains the requests param value.
@StefH commented on GitHub (Mar 10, 2018):
Thanks for this report.
@StefH commented on GitHub (Mar 10, 2018):
Will be fixed soon, please watch updates here + NuGet.
@raghavendrabankapur commented on GitHub (Mar 10, 2018):
I have a fix for the same. I will create a pull request.
On Sat, Mar 10, 2018, 8:19 PM Stef Heyenrath notifications@github.com
wrote:
@StefH commented on GitHub (Mar 10, 2018):
Already fixed, no need for PR.