Bug 52448

Summary: StreamContent apparently needs to rewind stream before sending it
Product: [Mono] Class Libraries Reporter: Jérémie Laval <jeremie.laval>
Component: System.Net.HttpAssignee: Marek Safar <masafa>
Severity: normal CC: knocte, mono-bugs+mono
Priority: ---    
Version: 4.8.0 (C9)   
Target Milestone: Untriaged   
Hardware: PC   
OS: Mac OS   
Tags: Is this bug a regression?: ---
Last known good build:

Description Jérémie Laval 2017-02-10 16:11:53 UTC
Uncovered while looking into NuGet issue: https://github.com/NuGet/Home/issues/3251

See notes I left in comment https://github.com/NuGet/Home/issues/3251#issuecomment-278543504

As weird as it seems to me, it looks like the use case that NuGet employs (re-sending the same StreamContent instance) is supported by, at least, corefx: https://github.com/dotnet/corefx/blob/master/src/System.Net.Http/src/System/Net/Http/StreamContent.cs#L98

I made a patch to implement this hackily and it does make NuGet push work: https://github.com/mono/mono/commit/7fe444e6b02db07563de38ba325877cbe4f5ace4
Comment 1 Marek Safar 2017-02-13 09:54:22 UTC
Which mono do you need this to be fixed?
Comment 2 Marek Safar 2017-02-13 21:46:23 UTC
Fixed in master and 2017-02
Comment 3 Jérémie Laval 2017-02-16 18:01:53 UTC
Perfect, thanks.
Comment 4 Andres G. Aragoneses 2017-12-21 08:16:24 UTC
> Fixed in master and 2017-02

Marek, what does this exactly mean? What's the first mono version that includes this fix?
Comment 5 Marek Safar 2017-12-21 08:23:56 UTC
See http://www.mono-project.com/docs/about-mono/versioning/
Comment 6 Andres G. Aragoneses 2017-12-21 09:33:41 UTC