mirror of
https://github.com/wiremock/WireMock.Net.git
synced 2026-01-11 22:30:41 +01:00
[PR #334] [MERGED] Fix issues with Proxy mode and Binary Request Bodies #864
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?
📋 Pull Request Information
Original PR: https://github.com/wiremock/WireMock.Net/pull/334
Author: @andi0b
Created: 8/26/2019
Status: ✅ Merged
Merged: 9/1/2019
Merged by: @StefH
Base:
master← Head:master📝 Commits (9)
5c17761Add Test for Proxy with binary request3c7e406Fix binary parsing in BodyParser4606fe3Fix binary Matching in RequestMessageBodyMatcherb35162aImproved Binary Matching in RequestMessageBodyMatcherba88b61BodyParser: Add test for Content Autodetectiond78da76RequestMessageBodyMatcherTests: Make Code more pretty :)21aaa5aBodyParserChanges: Revert white space changes8bd7cbdUpstream merge3ff44adFixed test for different behavior in request matching📊 Changes
6 files changed (+135 additions, -7 deletions)
View changed files
📝
src/WireMock.Net/Matchers/Request/RequestMessageBodyMatcher.cs(+3 -3)📝
src/WireMock.Net/Util/BodyParser.cs(+2 -2)📝
test/WireMock.Net.Tests/FluentMockServerTests.Proxy.cs(+38 -0)📝
test/WireMock.Net.Tests/FluentMockServerTests.cs(+1 -1)📝
test/WireMock.Net.Tests/RequestMatchers/RequestMessageBodyMatcherTests.cs(+75 -1)📝
test/WireMock.Net.Tests/Util/BodyParserTests.cs(+16 -0)📄 Description
We used Wiremocks.NET in Proxy mode to sometimes test against the real API and sometimes just mock it. This stopped working when we started POSTing JPEGs. The body was altered because WireMocks.NET started to parse the binary content as UTF8 and converted it back. This causes issues with binary contents, you can see it because the length changes.
This pull request contains:
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.