You've already forked linux-packaging-mono
Imported Upstream version 4.0.4.1
Former-commit-id: d8eb832a9a4b58a238f2e069a0b68c70082f8790
This commit is contained in:
@ -340,6 +340,8 @@ namespace System.Net.Http
|
||||
wrequest.ContentLength = content.Headers.ContentLength.Value;
|
||||
}
|
||||
|
||||
wrequest.ResendContentFactory = content.CopyTo;
|
||||
|
||||
var stream = await wrequest.GetRequestStreamAsync ().ConfigureAwait (false);
|
||||
await request.Content.CopyToAsync (stream).ConfigureAwait (false);
|
||||
} else if (HttpMethod.Post.Equals (request.Method) || HttpMethod.Put.Equals (request.Method) || HttpMethod.Delete.Equals (request.Method)) {
|
||||
|
@ -81,6 +81,12 @@ namespace System.Net.Http
|
||||
}
|
||||
}
|
||||
|
||||
// Only used by HttpWebRequest internals which is not async friendly
|
||||
internal void CopyTo (Stream stream)
|
||||
{
|
||||
CopyToAsync (stream).Wait ();
|
||||
}
|
||||
|
||||
public Task CopyToAsync (Stream stream)
|
||||
{
|
||||
return CopyToAsync (stream, null);
|
||||
|
Reference in New Issue
Block a user