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>
Status: RESOLVED FIXED    
Severity: normal CC: 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.