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-02-16 18:01 UTC (History)
1 user (show)

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


Attachments

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.

Note You need to log in before you can comment on or make changes to this bug.