Skip to content
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

Issue: DELETE method is proxied as lowercase #205

Closed
r-kolbovich opened this issue Sep 17, 2018 · 4 comments
Closed

Issue: DELETE method is proxied as lowercase #205

r-kolbovich opened this issue Sep 17, 2018 · 4 comments
Assignees
Labels

Comments

@r-kolbovich
Copy link

I noticed quite strange behavior of wiremock when it proxies requests to another server.
'GET', 'POST', 'PUT' methods, are proxied uppercase. But 'DELETE' method behaves different: after proxying it becomes 'delete'.

Below you can find a gif where I demonstrate this issue.
wiremock-delete-request-lowercase

Below is my code, which just proxies everything to http://httpbin.org - simple online REST API for debugging. I've used latest version of WireMock.Net (1.0.4.16):

class Program
{
    static void Main(string[] args)
    {
        var server = FluentMockServer.StartWithAdminInterface(9999);
        Console.WriteLine("FluentMockServer running at {0}", server.Ports.First());

        server.Given(
            Request.Create().WithPath("*")
        )
        .RespondWith(
            Response.Create().WithProxy("http://httpbin.org")
        );

        Console.ReadKey();
    }
}
@r-kolbovich r-kolbovich changed the title When DELETE method is proxied, it becomes lowercase DELETE method is proxied as lowercase Sep 17, 2018
@StefH
Copy link
Collaborator

StefH commented Sep 17, 2018

I did not catch which dotnet version you are using?

@r-kolbovich
Copy link
Author

.NET Framework 4.6.1

@StefH StefH self-assigned this Sep 18, 2018
@StefH StefH added the bug label Sep 18, 2018
@StefH StefH changed the title DELETE method is proxied as lowercase Issue: DELETE method is proxied as lowercase Sep 18, 2018
StefH added a commit that referenced this issue Sep 18, 2018
@StefH
Copy link
Collaborator

StefH commented Sep 19, 2018

This is indeed a bug. I'm investigating this and already have a fix ready. I keep you updated here on the progress.

StefH added a commit that referenced this issue Sep 22, 2018
* Lower priority from Proxy mappings

* Fix codefactor

* extra tests

* #205

* Fix test for linux

* `c:\temp\x.json` fix

* Extra tests

* more tests

* more tests

* codefactor

* #200

* refactor

* refactor

* tests
@StefH
Copy link
Collaborator

StefH commented Sep 22, 2018

Solved in new package (soon to be added to NuGet)

@StefH StefH closed this as completed Sep 22, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants