WireMock.Net is a flexible product for stubbing and mocking web HTTP responses using advanced request matching and response templating. Based on the functionality from http://WireMock.org, but extended with more functionality.
Apache License 2.0
1.35k
stars
197
forks
source link
Encoded url path parameter decoded via proxy #1097
An encoded url parameter looks decoded by WireMock server. My code sends a request like : POST http://localhost:4200/api/file%3Atest.pdf to Wiremock proxy server. The url is then transformed to POST https://webservie.com/api/file:test.pdf. Here the url encoded parameter file%3Atest.pdf is decoded and forwarded as file:test.pdf which generate an error from the webservice
I
Expected behavior:
I expect that encoded url parameter are not decoded
Describe the bug
An encoded url parameter looks decoded by WireMock server. My code sends a request like :
POST http://localhost:4200/api/file%3Atest.pdf
to Wiremock proxy server. The url is then transformed toPOST https://webservie.com/api/file:test.pdf
. Here the url encoded parameterfile%3Atest.pdf
is decoded and forwarded asfile:test.pdf
which generate an error from the webserviceI
Expected behavior:
I expect that encoded url parameter are not decoded
Test to reproduce
MockServer .Given(Request.Create().WithPath($"/service/")) .RespondWith(Response.Create() .WithProxy(new ProxyAndRecordSettings { Url = "https://webservice.com/",