Imported Upstream version 6.0.0.300

Former-commit-id: 5d008a9f41819eeae8c2feef3b41fc6cbf03e9fb
This commit is contained in:
Xamarin Public Jenkins (auto-signing)
2019-06-14 08:42:46 +00:00
parent a63e3f0156
commit 860af8198e
52 changed files with 68 additions and 39 deletions

View File

@@ -67,6 +67,7 @@ namespace System.Net.Http
bool unsafeAuthenticatedConnectionSharing;
bool sentRequest;
string connectionGroupName;
TimeSpan? timeout;
bool disposed;
internal MonoWebRequestHandler ()
@@ -368,6 +369,9 @@ namespace System.Net.Http
wr.ServicePoint.Expect100Continue = request.Headers.ExpectContinue == true;
if (timeout != null)
wr.Timeout = (int)timeout.Value.TotalMilliseconds;
// Add request headers
var headers = wr.Headers;
foreach (var header in request.Headers) {
@@ -533,5 +537,10 @@ namespace System.Net.Http
throw new NotImplementedException ();
}
}
void IMonoHttpClientHandler.SetWebRequestTimeout (TimeSpan timeout)
{
this.timeout = timeout;
}
}
}