Issue: DELETE method is proxied as lowercase #142

Closed
opened 2025-12-29 08:22:48 +01:00 by adam · 4 comments
Owner

Originally created by @r-kolbovich on GitHub (Sep 17, 2018).

Originally assigned to: @StefH on GitHub.

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();
    }
}
Originally created by @r-kolbovich on GitHub (Sep 17, 2018). Originally assigned to: @StefH on GitHub. 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](https://user-images.githubusercontent.com/9084096/45630837-39ae6980-baa2-11e8-8e2b-389643623442.gif) 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(); } } ```
adam added the bug label 2025-12-29 08:22:48 +01:00
adam closed this issue 2025-12-29 08:22:49 +01:00
Author
Owner

@StefH commented on GitHub (Sep 17, 2018):

I did not catch which dotnet version you are using?

@StefH commented on GitHub (Sep 17, 2018): I did not catch which dotnet version you are using?
Author
Owner

@r-kolbovich commented on GitHub (Sep 17, 2018):

.NET Framework 4.6.1

@r-kolbovich commented on GitHub (Sep 17, 2018): .NET Framework 4.6.1
Author
Owner

@StefH commented on GitHub (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 commented on GitHub (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.
Author
Owner

@StefH commented on GitHub (Sep 22, 2018):

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

@StefH commented on GitHub (Sep 22, 2018): Solved in new package (soon to be added to NuGet)
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/WireMock.Net#142