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

Proxy mode: Incorrect handling of multipart requests #468

Closed
LevYas opened this issue May 17, 2020 · 6 comments
Closed

Proxy mode: Incorrect handling of multipart requests #468

LevYas opened this issue May 17, 2020 · 6 comments
Labels

Comments

@LevYas
Copy link

LevYas commented May 17, 2020

I have an ASP.Net Core API method with the following signature

[HttpPut("pic")]
public ActionResult UpdatePicture(IFormFile file)

I call this method from Postman or curl or from my front-end with a small picture file. It's ok without proxy, but with proxy file is always null.

It looks like WireMock.Net treats multipart requests as a single part request with raw data, but I can be wrong. I added reading the Form field and it contains the right content:
2020-05-17 14_34_07-WireMock Net Solution (Debugging) - Microsoft Visual Studio

I created a repro here https://github.com/LevYas/WireMockNetRepro

@LevYas LevYas changed the title Proxy mode: incorrect multipart requests handling Proxy mode: Incorrect multipart requests handling May 17, 2020
@LevYas LevYas changed the title Proxy mode: Incorrect multipart requests handling Proxy mode: Incorrect handling of multipart requests May 17, 2020
@StefH StefH added the bug label May 22, 2020
@StefH
Copy link
Collaborator

StefH commented May 22, 2020

Bug is confirmed, thanks for analyzing.

However fixing will take some time...

@LevYas
Copy link
Author

LevYas commented May 22, 2020

You are welcome. Yeah, fix will not be trivial, especially bearing in mind different target frameworks.

@StefH
Copy link
Collaborator

StefH commented May 23, 2020

#473

@StefH
Copy link
Collaborator

StefH commented May 23, 2020

@LevYas Can you try version WireMock.Net.1.2.11-ci-13392 ?

@LevYas
Copy link
Author

LevYas commented May 23, 2020

@StefH - you are incredibly fast. I've just tested - it works!

@StefH
Copy link
Collaborator

StefH commented May 23, 2020

You are a very good tester!

I will make new official version today.

@StefH StefH closed this as completed May 23, 2020
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