Upgrade to 1.5.19 breaks a form data test #501

Closed
opened 2025-12-29 15:25:28 +01:00 by adam · 4 comments
Owner

Originally created by @basdijkstra on GitHub (Mar 19, 2023).

Originally assigned to: @StefH on GitHub.

So, I've got a test in my RestAssured.Net repo that breaks after upgrading to WireMock .Net 1.5.19, but I don't understand why.

This is what the request that's made looks like:

image

and this is my stub definition:

private void CreateStubForFormData()
{
    this.Server?.Given(Request.Create().WithPath("/form-data").UsingPost()
        .WithHeader("Content-Type", "application/x-www-form-urlencoded")
        .WithBody(new ExactMatcher("name=John+Doe&email=johndoe%40example.com")))
        .RespondWith(Response.Create()
        .WithStatusCode(201));
}

Works a charm with version 1.5.18 (WireMock returns the 201), but not anymore after upgrading to 1.5.19 (WireMock returns a 404, so there's probably a matching issue). What am I missing here?

Originally created by @basdijkstra on GitHub (Mar 19, 2023). Originally assigned to: @StefH on GitHub. So, I've got a test in my [RestAssured.Net](https://github.com/basdijkstra/rest-assured-net/blob/main/RestAssured.Net.Tests/FormDataTests.cs) repo that breaks after upgrading to WireMock .Net 1.5.19, but I don't understand why. This is what the request that's made looks like: ![image](https://user-images.githubusercontent.com/10740451/226161281-a0ef558a-e91f-4d8c-a748-ed2a1e7e8f8c.png) and this is my stub definition: ```csharp private void CreateStubForFormData() { this.Server?.Given(Request.Create().WithPath("/form-data").UsingPost() .WithHeader("Content-Type", "application/x-www-form-urlencoded") .WithBody(new ExactMatcher("name=John+Doe&email=johndoe%40example.com"))) .RespondWith(Response.Create() .WithStatusCode(201)); } ``` Works a charm with version 1.5.18 (WireMock returns the 201), but not anymore after upgrading to 1.5.19 (WireMock returns a 404, so there's probably a matching issue). What am I missing here?
adam added the bug label 2025-12-29 15:25:28 +01:00
adam closed this issue 2025-12-29 15:25:29 +01:00
Author
Owner

@StefH commented on GitHub (Mar 19, 2023):

It related to new code in https://github.com/WireMock-Net/WireMock.Net/pull/903

I'll take a look.

@StefH commented on GitHub (Mar 19, 2023): It related to new code in https://github.com/WireMock-Net/WireMock.Net/pull/903 I'll take a look.
Author
Owner

@StefH commented on GitHub (Mar 19, 2023):

https://github.com/WireMock-Net/WireMock.Net/pull/907

@StefH commented on GitHub (Mar 19, 2023): https://github.com/WireMock-Net/WireMock.Net/pull/907
Author
Owner

@StefH commented on GitHub (Mar 19, 2023):

@basdijkstra
It should be fixed in 1.5.20

Please test and if you find any other things, pleas e create a issue.

@StefH commented on GitHub (Mar 19, 2023): @basdijkstra It should be fixed in 1.5.20 Please test and if you find any other things, pleas e create a issue.
Author
Owner

@basdijkstra commented on GitHub (Mar 20, 2023):

Hey @StefH, thank you, that new release has indeed fixed the issue. Appreciate the quick action taken!

@basdijkstra commented on GitHub (Mar 20, 2023): Hey @StefH, thank you, that new release has indeed fixed the issue. Appreciate the quick action taken!
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/WireMock.Net-wiremock#501