mirror of
https://github.com/wiremock/WireMock.Net.git
synced 2026-01-11 22:30:41 +01:00
Admin API: PUT Mapping, FormatException because of wrong parsing of the Query #203
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 @andi0b on GitHub (Aug 20, 2019).
Originally assigned to: @StefH on GitHub.
It sounds a bit crazy, but if you PUT a new Mapping through the Admin API you get an Exception if the GUID starts with
aord. This happens because of this line of code:12444cc11e/src/WireMock.Net/Server/FluentMockServer.Admin.cs (L362)It trims away characters from the beginning, including
aandd. We had flaky unit tests because of that and could't believe it in the beginning when we found that issue ;)How to reproduce:
Start Wiremock.NET 1.0.27 with Admin API and send Request
Then you will receive this error:
because this get's excuted:
What I expect:
Put another GUID there, and it suddenly works:
@StefH commented on GitHub (Aug 20, 2019):
Good catch !
https://github.com/WireMock-Net/WireMock.Net/pull/326
@StefH commented on GitHub (Aug 20, 2019):
solved