You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I've a situation where I need to pass in a PipeReader stream for use a MiltiPartItem form files for a POST request.
However I notice the current writeMultipart and CombinedStream implementations lean on the Stream.Length property which is where things fail.
The Length property assumes provided streams are seekable, which PipeReader (and others) are not.
In my testing I've removed all the Stream.Lengh references, (which also means the CombinedStream cant calculate it's length) and removed the assignment of length during request building.
Requests are still issued to and accepted by the server, so it initially seems ok to permit non seekable streams
I've a situation where I need to pass in a PipeReader stream for use a
MiltiPartItemform files for aPOSTrequest.However I notice the current writeMultipart and CombinedStream implementations lean on the
Stream.Lengthproperty which is where things fail.The
Lengthproperty assumes provided streams are seekable, whichPipeReader(and others) are not.In my testing I've removed all the
Stream.Lenghreferences, (which also means theCombinedStreamcant calculate it's length) and removed the assignment of length during request building.Requests are still issued to and accepted by the server, so it initially seems ok to permit non seekable streams
Thoughts
WebRequestimplementation, and I've no idea if this will work inHttpClientUse System.Net.Http.HttpClient #1392POSTrequest to have a Length.Thoughts please, as to if this would be a valid inclusion ?