-
-
Notifications
You must be signed in to change notification settings - Fork 201
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
WithHeader cannot handle multiple requests with the same header key values #814
Comments
I think I've fixed both issues (this & _callscount). Can you please test preview version (https://github.com/WireMock-Net/WireMock.Net/wiki/MyGet-preview-versions) |
Did you have time to validate? |
@StefH Sorry, only now have time to test. The package version you mention is (no longer) available. Which version should I take for testing? |
can you please try |
Tried it and failed, decompilation seems to show that the code isn't merged into that branch yet. Is that possible? |
Sorry, wrong branch. This id: 16511 should be it. |
Tried it! However it now tries to match the first request made to WireMock whereas the request I'm trying to match (via the AtUrl call) is the last request |
@robvangeloven Can you please take a look at this unit test file? See line 463. |
I've checked the unit test, but that one doesn't actually check any headers? |
Correct. I did combine both your issues into 1 PR. And I think both issues are solved. In case you still have an issue, please provide a unit test. |
Yes, retested everything and both issues are fixed! |
Thanks for retesting. A new NuGet version will be released this weekend. |
When using the assertion "WithHeader" it will fail if there are multiple requests with the same header value (e.g. "Accept"):
This is because there is a ToDictionary in the WithHeader function that doesn't take into account that multiple calls might have been made before the assert fires.
The text was updated successfully, but these errors were encountered: