mirror of
https://github.com/wiremock/WireMock.Net.git
synced 2026-01-11 22:30:41 +01:00
There is no option to increase body size while proxying #266
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @LevYas on GitHub (Apr 22, 2020).
Originally assigned to: @StefH on GitHub.
I had a task to proxy API which, as part of a pipeline, receives big (60MB) zip-file. The WireMock's kestrel said that the entity is too big. I looked for options to increase it, and only found an option to set action
PreWireMockMiddlewareInitto this:But it has no effect at all.
Can I do something to remove size limit?
P.S. I remember about your request, I'm testing it right now :)
@StefH commented on GitHub (Apr 22, 2020):
On which framework do you run?
@LevYas commented on GitHub (Apr 22, 2020):
Sorry, it's Net Core 2.1
@StefH commented on GitHub (Apr 23, 2020):
For proxying, a normal HttpClient is used. And the response from this call is forwarded to wiremock server.
Can you provide the full stacktrace error? Or better, create a working example?
@LevYas commented on GitHub (Apr 23, 2020):
I can provide the full stack trace right now:
@StefH commented on GitHub (Apr 24, 2020):
@LevYas
It's probably related to https://stackoverflow.com/questions/46738364/increase-upload-request-length-limit-in-kestrel
I've updated the code and a new preview MyGet package can be tested :
WireMock.Net.1.2.5-ci-13227.nupkg.@LevYas commented on GitHub (Apr 24, 2020):
Yes, it is. And you pointed to a very simple solution, which can be applied in the source code. I tried to increase the limit after the Kestrel initialization using
IHttpMaxRequestBodySizeFeature, but with no success.You are very fast, thank you! I will try to check it but don't know when :)
I can't see any changes in the repo code, did you remove the limit altogether, or provide an option to remove it?
@StefH commented on GitHub (Apr 24, 2020):
See this PR:
https://github.com/WireMock-Net/WireMock.Net/pull/457
@StefH commented on GitHub (Apr 30, 2020):
@LevYas did you already have time to verify this one and the handlebars.net.helpers PR?
@StefH commented on GitHub (May 10, 2020):
@LevYas did you already have time to verify this one and the handlebars.net.helpers PR's?
@LevYas commented on GitHub (May 10, 2020):
Oh, sorry, it was a hard time for me. I'll try to check it in a few days, it will not be so easy, because I don't have access to code that used this functionality anymore.
@StefH commented on GitHub (May 11, 2020):
No problem, I was just curious if these two fixes are now working as expected.
No rush needed !
If you can test it, that would be great. Else within some time, I'll just merge to master and release a new version.
@LevYas commented on GitHub (May 17, 2020):
I checked it, yeah, there is progress - I receive 400 from my API instead of 500 from WireMock 😁
I created another issue about it, and it seems to me that we can merge the changes and then close this issue.
@StefH commented on GitHub (May 17, 2020):
OK. Thank.
I'll merge and create new NuGet.