Imported Upstream version 5.4.0.167

Former-commit-id: 5624ac747d633e885131e8349322922b6a59baaa
This commit is contained in:
Xamarin Public Jenkins (auto-signing)
2017-08-21 15:34:15 +00:00
parent e49d6f06c0
commit 536cd135cc
12856 changed files with 563812 additions and 223249 deletions

View File

@ -375,8 +375,9 @@ namespace System.Net.Http
wrequest.ResendContentFactory = content.CopyTo;
var stream = await wrequest.GetRequestStreamAsync ().ConfigureAwait (false);
await request.Content.CopyToAsync (stream).ConfigureAwait (false);
using (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)) {
// Explicitly set this to make sure we're sending a "Content-Length: 0" header.
// This fixes the issue that's been reported on the forums:

View File

@ -66,7 +66,7 @@ namespace System.Net.Http
public string ReasonPhrase {
get {
return reasonPhrase ?? HttpListenerResponseHelper.GetStatusDescription ((int) statusCode);
return reasonPhrase ?? HttpStatusDescription.Get (statusCode);
}
set {
reasonPhrase = value;