Bug 52448 - StreamContent apparently needs to rewind stream before sending it
Summary: StreamContent apparently needs to rewind stream before sending it
Status: RESOLVED FIXED
Alias: None
Product: Class Libraries
Classification: Mono
Component: System.Net.Http (show other bugs)
Version: 4.8.0 (C9)
Hardware: PC Mac OS
: --- normal
Target Milestone: Untriaged
Assignee: Marek Safar
URL:
Depends on:
Blocks:
 
Reported: 2017-02-10 16:11 UTC by Jérémie Laval
Modified: 2017-12-21 09:33 UTC (History)
2 users (show)

Tags:
Is this bug a regression?: ---
Last known good build:

Notice (2018-05-24): bugzilla.xamarin.com is now in read-only mode.

Please join us on Visual Studio Developer Community and in the Xamarin and Mono organizations on GitHub to continue tracking issues. Bugzilla will remain available for reference in read-only mode. We will continue to work on open Bugzilla bugs, copy them to the new locations as needed for follow-up, and add the new items under Related Links.

Our sincere thanks to everyone who has contributed on this bug tracker over the years. Thanks also for your understanding as we make these adjustments and improvements for the future.


Please create a new report on GitHub or Developer Community with your current version information, steps to reproduce, and relevant error messages or log files if you are hitting an issue that looks similar to this resolved bug and you do not yet see a matching new report.

Related Links:
Status:
RESOLVED FIXED

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
Thanks