You've already forked linux-packaging-mono
Imported Upstream version 6.10.0.76
Former-commit-id: 7f253ed035f518a4ffbc5ce16f84e5a63ffcd26e
This commit is contained in:
parent
09b9e50ddf
commit
6b40127559
@@ -1,3 +1,5 @@
|
||||
using System.Reflection;
|
||||
|
||||
namespace System.Net.Http
|
||||
{
|
||||
partial class HttpClientHandler : HttpMessageHandler
|
||||
@@ -6,7 +8,12 @@ namespace System.Net.Http
|
||||
{
|
||||
string envvar = Environment.GetEnvironmentVariable ("XA_HTTP_CLIENT_HANDLER_TYPE")?.Trim ();
|
||||
if (envvar?.StartsWith("System.Net.Http.MonoWebRequestHandler", StringComparison.InvariantCulture) == true)
|
||||
return new MonoWebRequestHandler ();
|
||||
{
|
||||
Type monoWrhType = Type.GetType (envvar, false);
|
||||
if (monoWrhType != null)
|
||||
return (IMonoHttpClientHandler) Activator.CreateInstance (monoWrhType);
|
||||
}
|
||||
|
||||
// Ignore other types of handlers here (e.g. AndroidHttpHandler) to keep the old behavior
|
||||
// and always create SocketsHttpHandler for code like this if MonoWebRequestHandler was not specified:
|
||||
//
|
||||
|
Reference in New Issue
Block a user