Replace legacy WebApi.Client multipart parsing with modern WebUtilities - #156
Merged
Merged
Conversation
Removes the legacy `Microsoft.AspNet.WebApi.Client` package dependency and its high-allocation `MultipartMemoryStreamProvider` execution path. - Replaces `ReadAsMultipartAsync` with an efficient custom extension utilizing `MultipartReader` from `Microsoft.AspNetCore.WebUtilities`. - Safely isolates and eagerly buffers individual multipart section data into memory streams to prevent `Unexpected end of Stream` exceptions during asynchronous iterations. - Preserves downstream `HttpContent` polymorphic formatting and streaming architectures across all multi-targeted platforms (`netstandard2.0`, `net8.0`, and `net10.0`). - Keeps the modern .NET targets clear of unneeded dependencies by cleanly scoping legacy package assets to the .NET Standard target.
adrianiftode
force-pushed
the
features/remove-dependency-to-webapi-client
branch
from
July 28, 2026 09:37
6036fce to
3603df4
Compare
Contributor
|
Thanks! That's an even cleaner solution then my PR 😅 |
Owner
Author
|
Yeah, I remembered about this issue, and with some AI I could implement
that multi part reader. At the time of your PR I thought it was still a
difficult task, but yeah, times have changed.
…On Tue, Jul 28, 2026 at 6:22 PM Joseph Petersen ***@***.***> wrote:
*jetersen* left a comment (adrianiftode/FluentAssertions.Web#156)
<#156 (comment)>
Thanks! That's an even cleaner solution then my PR 😅
—
Reply to this email directly, view it on GitHub
<#156?email_source=notifications&email_token=ADI5U23KZ5R2TX2EZ5VIPLD5HDOODA5CNFSNUABFM5UWIORPF5TWS5BNNB2WEL2JONZXKZKDN5WW2ZLOOQXTKMJQG42DINZVGQ32M4TFMFZW63VMON2GC5DFL5RWQYLOM5S2KZLWMVXHJLDGN5XXIZLSL5RWY2LDNM#issuecomment-5107447547>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/ADI5U2YYLLVJLC6N7DUVNFL5HDOODAVCNFSNUABFKJSXA33TNF2G64TZHMZDAOBRGIZTQNJTHNEXG43VMU5TIOJZG4YDCNJRGQ2KC5QC>
.
Triage notifications, keep track of coding agent tasks and review pull
requests on the go with GitHub Mobile for iOS
<https://github.com/notifications/mobile/ios/ADI5U254IT6EUJB47P4MUKT5HDOODA5CNFSNUABFM5UWIORPF5TWS5BNNB2WEL2JONZXKZKDN5WW2ZLOOQXTKMJQG42DINZVGQ32M4TFMFZW63VMON2GC5DFL5RWQYLOM5S2KZLWMVXHJKTGN5XXIZLSL5UW64Y>
and Android
<https://github.com/notifications/mobile/android/ADI5U25E7UR45H3LQQNDQND5HDOODA5CNFSNUABFM5UWIORPF5TWS5BNNB2WEL2JONZXKZKDN5WW2ZLOOQXTKMJQG42DINZVGQ32M4TFMFZW63VMON2GC5DFL5RWQYLOM5S2KZLWMVXHJLTGN5XXIZLSL5QW4ZDSN5UWI>.
Download it today!
You are receiving this because you modified the open/close state.Message
ID: ***@***.***>
|
3 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Removes the legacy
Microsoft.AspNet.WebApi.Clientpackage dependency and its high-allocationMultipartMemoryStreamProviderexecution path.ReadAsMultipartAsyncwith an efficient custom extension utilizingMultipartReaderfromMicrosoft.AspNetCore.WebUtilities.Unexpected end of Streamexceptions during asynchronous iterations.HttpContentpolymorphic formatting and streaming architectures across all multi-targeted platforms (netstandard2.0,net8.0, andnet10.0).Before
After