diff options
author | Martin Baulig <mabaul@microsoft.com> | 2019-02-01 16:09:30 +0300 |
---|---|---|
committer | Marek Safar <marek.safar@gmail.com> | 2019-02-01 16:09:30 +0300 |
commit | 2f411750acfd2132f9b4970ef8cf11d9a0f62df9 (patch) | |
tree | 9cbe04bbe431151ed38c0f2a2d9fc307d0a0a5ed /mcs/class/System.Net.Http | |
parent | af70768885ef3d403db534ed1bd8af798cbc80e0 (diff) |
"Imperial Red": Bring HttpClient from CoreFx (#11906)
This brings `System.Net.Http` from CoreFx.
It is currently only enabled on Desktop Mac and Linux; Mobile is coming shortly.
Diffstat (limited to 'mcs/class/System.Net.Http')
62 files changed, 2464 insertions, 231 deletions
diff --git a/mcs/class/System.Net.Http/FunctionalTests/.gitignore b/mcs/class/System.Net.Http/FunctionalTests/.gitignore new file mode 100644 index 00000000000..5a58cfc51af --- /dev/null +++ b/mcs/class/System.Net.Http/FunctionalTests/.gitignore @@ -0,0 +1,2 @@ +TestData +testdata.zip diff --git a/mcs/class/System.Net.Http/FunctionalTests/DiagnosticsTests.cs b/mcs/class/System.Net.Http/FunctionalTests/DiagnosticsTests.cs new file mode 100644 index 00000000000..607f527f1a4 --- /dev/null +++ b/mcs/class/System.Net.Http/FunctionalTests/DiagnosticsTests.cs @@ -0,0 +1,10 @@ +using Xunit; + +namespace System.Net.Http.Functional.Tests +{ + [SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework, "NetEventSource is only part of .NET Core.")] + [SkipOnTargetFramework(TargetFrameworkMonikers.Mono, "NetEventSource is only part of .NET Core.")] + public abstract class DiagnosticsTest : HttpClientTestBase + { + } +} diff --git a/mcs/class/System.Net.Http/FunctionalTests/HttpClientHandlerTest.Decompression.cs b/mcs/class/System.Net.Http/FunctionalTests/HttpClientHandlerTest.Decompression.cs new file mode 100644 index 00000000000..9d5a44700e9 --- /dev/null +++ b/mcs/class/System.Net.Http/FunctionalTests/HttpClientHandlerTest.Decompression.cs @@ -0,0 +1,9 @@ +using Xunit; + +namespace System.Net.Http.Functional.Tests +{ + [SkipOnTargetFramework(TargetFrameworkMonikers.Mono, "We don't support BrotliStream yet.")] + public abstract class HttpClientHandler_Decompression_Test : HttpClientTestBase + { + } +} diff --git a/mcs/class/System.Net.Http/FunctionalTests/Makefile b/mcs/class/System.Net.Http/FunctionalTests/Makefile new file mode 100644 index 00000000000..53d91d6542f --- /dev/null +++ b/mcs/class/System.Net.Http/FunctionalTests/Makefile @@ -0,0 +1,20 @@ +thisdir = class/System.Net.Http/FunctionalTests +SUBDIRS = +include ../../../build/rules.make + +ASSEMBLY = System.Net.Http.FunctionalTests + +XTEST_LIB_REFS = System System.Core Facades/System.Threading.Tasks +USE_XTEST_REMOTE_EXECUTOR = YES + +XTEST_LIB_FLAGS = /resource:../TestData/testservereku.contoso.com.pfx + +the_assembly = $(topdir)/class/lib/$(PROFILE_DIRECTORY)/System.Net.Http.dll + +include ../../../build/tests.make + +TEST_RUNTIME := MONO_URI_DOTNETRELATIVEORABSOLUTE=true $(TEST_RUNTIME) + +clean-local: + -rm -f $(tests_CLEAN_FILES) $(CLEAN_FILES) + diff --git a/mcs/class/System.Net.Http/FunctionalTests/System.Net.Http.FunctionalTests_xtest.dll.sources b/mcs/class/System.Net.Http/FunctionalTests/System.Net.Http.FunctionalTests_xtest.dll.sources new file mode 100644 index 00000000000..849dbfffacb --- /dev/null +++ b/mcs/class/System.Net.Http/FunctionalTests/System.Net.Http.FunctionalTests_xtest.dll.sources @@ -0,0 +1 @@ +#include legacy-test.sources diff --git a/mcs/class/System.Net.Http/FunctionalTests/functional-tests.sources b/mcs/class/System.Net.Http/FunctionalTests/functional-tests.sources new file mode 100644 index 00000000000..ed1f44028a8 --- /dev/null +++ b/mcs/class/System.Net.Http/FunctionalTests/functional-tests.sources @@ -0,0 +1,42 @@ +../corefx/Configuration.Certificates.cs +../corefx/Configuration.Http.cs +../corefx/Interop.VersionInfo.cs +../corefx/PlatformDetection.cs + +# Common Sources + +../../../../external/corefx/src/Common/tests/System/Net/Configuration.Http.cs + +# Test Utitities + +../../../../external/corefx/src/CoreFx.Private.TestUtilities/src/System/AssertExtensions.cs +../../../../external/corefx/src/CoreFx.Private.TestUtilities/src/System/TestEnvironment.cs +../../../../external/corefx/src/CoreFx.Private.TestUtilities/src/System/TheoryExtensions.cs + +# Common Test Sources + +../../../../external/corefx/src/Common/tests/System/Buffers/NativeMemoryManager.cs +../../../../external/corefx/src/Common/tests/System/Diagnostics/Tracing/TestEventListener.cs +../../../../external/corefx/src/Common/tests/System/Diagnostics/Tracing/ConsoleEventListener.cs +../../../../external/corefx/src/Common/tests/System/IO/DelegateStream.cs +../../../../external/corefx/src/Common/tests/System/Net/RemoteServerQuery.cs +../../../../external/corefx/src/Common/tests/System/Net/EventSourceTestLogging.cs +../../../../external/corefx/src/Common/tests/System/Net/HttpsTestServer.cs +../../../../external/corefx/src/Common/tests/System/Net/Capability.Security.cs +../../../../external/corefx/src/Common/tests/System/Net/Configuration.cs +../../../../external/corefx/src/Common/tests/System/Net/Configuration.Http.cs +../../../../external/corefx/src/Common/tests/System/Net/Configuration.Security.cs +../../../../external/corefx/src/Common/tests/System/Net/TestWebProxies.cs +../../../../external/corefx/src/Common/tests/System/Net/VerboseTestLogging.cs +../../../../external/corefx/src/Common/tests/System/Net/Http/LoopbackServer.cs +../../../../external/corefx/src/Common/tests/System/Net/Http/LoopbackServer.AuthenticationHelpers.cs +../../../../external/corefx/src/Common/tests/System/Threading/Tasks/TaskTimeoutExtensions.cs + +# System.Net.Http FunctionalTests + +../../../../external/corefx/src/System.Net.Http/tests/FunctionalTests/*.cs:MultiInterfaceReadOnlyStream.cs,MultiInterfaceNonRewindableReadOnlyStream.cs,HttpClientHandlerTest.ServerCertificates.Windows.cs,HttpClientHandlerTest.SslProtocols.Windows.cs,HttpClientHandlerTest.Decompression.cs,PostScenarioUWPTest.cs,DiagnosticsTests.cs,FakeDiagnosticSourceListenerObserver.cs,PlatformHandlerTest.cs + +# Stubbed out + +DiagnosticsTests.cs +HttpClientHandlerTest.Decompression.cs diff --git a/mcs/class/System.Net.Http/FunctionalTests/legacy-test.sources b/mcs/class/System.Net.Http/FunctionalTests/legacy-test.sources new file mode 100644 index 00000000000..e69de29bb2d --- /dev/null +++ b/mcs/class/System.Net.Http/FunctionalTests/legacy-test.sources diff --git a/mcs/class/System.Net.Http/FunctionalTests/linux_net_4_x_System.Net.Http.FunctionalTests_xtest.dll.sources b/mcs/class/System.Net.Http/FunctionalTests/linux_net_4_x_System.Net.Http.FunctionalTests_xtest.dll.sources new file mode 100644 index 00000000000..fdec50375fd --- /dev/null +++ b/mcs/class/System.Net.Http/FunctionalTests/linux_net_4_x_System.Net.Http.FunctionalTests_xtest.dll.sources @@ -0,0 +1 @@ +#include functional-tests.sources diff --git a/mcs/class/System.Net.Http/FunctionalTests/macos_net_4_x_System.Net.Http.FunctionalTests_xtest.dll.sources b/mcs/class/System.Net.Http/FunctionalTests/macos_net_4_x_System.Net.Http.FunctionalTests_xtest.dll.sources new file mode 100644 index 00000000000..fdec50375fd --- /dev/null +++ b/mcs/class/System.Net.Http/FunctionalTests/macos_net_4_x_System.Net.Http.FunctionalTests_xtest.dll.sources @@ -0,0 +1 @@ +#include functional-tests.sources diff --git a/mcs/class/System.Net.Http/FunctionalTests/setup-client.rb b/mcs/class/System.Net.Http/FunctionalTests/setup-client.rb new file mode 100755 index 00000000000..2a6a4577dd0 --- /dev/null +++ b/mcs/class/System.Net.Http/FunctionalTests/setup-client.rb @@ -0,0 +1,72 @@ +#!/usr/bin/env ruby +require 'open-uri' +require 'fileutils' +require 'rubygems' +require 'zip' + +$testDataUri = "https://github.com/dotnet/corefx-testdata/archive/master.zip" +$testDataZip = "testdata.zip" +$testDataDir = "TestData" + +$testDataCertificatePath = "corefx-testdata-master/System.Net.TestData" +$testDataCertificate = "TestData/testclient1_at_contoso.com.cer" + +$testData = "corefx-testdata" + +def download(url, path) + return if File.exists?(path) + + puts "Dowloading #{url} ..." + + case io = open(url) + when StringIO then File.open(path, 'w') { |f| f.write(io) } + when Tempfile then io.close; FileUtils.mv(io.path, path) + end + + puts "Wrote #{path}." +end + +def deleteTestData() + FileUtils.rm_rf($testDataDir) +end + +def downloadTestData() + download($testDataUri, $testDataZip) + FileUtils.mkdir_p($testDataDir) + + Zip::File.open($testDataZip) do |zip| + zip.glob("**/System.Net.TestData/*") do |entry| + f_path=File.join($testDataDir, File.basename(entry.name)) + unless File.exists?(f_path) + entry.extract(f_path) + puts "Extracted #{f_path}" + end + end + end +end + +def installCertificate() + downloadTestData() + system("sudo security add-trusted-cert -d -r trustAsRoot -p ssl -u 1 -k /Library/Keychains/System.keychain #{$testDataCertificate}") +end + +def removeCertificate() + downloadTestData() + system("sudo security remove-trusted-cert -d #{$testDataCertificate}") +end + +# deleteTestData +downloadTestData + +installCertificate() + +# sudo security add-trusted-cert -d -r trustRoot -k /Library/Keychains/System.keychain TestData/testclient1_at_contoso.com.cer + + +#$script:certificatePath = "$($script:testData)\corefx-testdata-master\System.Net.TestData" + +#$script:clientPrivateKeyPath = Join-Path $script:certificatePath "testclient1_at_contoso.com.pfx" +#$script:clientPrivateKeyPassword = "testcertificate" + +##$script:serverPrivateKeyPath = Join-Path $script:certificatePath "contoso.com.pfx" +#$script:serverPrivateKeyPassword = "testcertificate"" diff --git a/mcs/class/System.Net.Http/HeaderUtils.Legacy.cs b/mcs/class/System.Net.Http/HeaderUtils.Legacy.cs new file mode 100644 index 00000000000..f1e51e81217 --- /dev/null +++ b/mcs/class/System.Net.Http/HeaderUtils.Legacy.cs @@ -0,0 +1,18 @@ +using System.Collections.Generic; +using System.Net.Http.Headers; + +namespace System.Net.Http +{ + static class HeaderUtils + { + internal static bool IsContentHeader (string name) + { + return HttpHeaders.GetKnownHeaderKind (name) == Headers.HttpHeaderKind.Content; + } + + internal static string GetSingleHeaderString (string name, IEnumerable<string> values) + { + return HttpRequestHeaders.GetSingleHeaderString (name, values); + } + } +} diff --git a/mcs/class/System.Net.Http/HeaderUtils.SocketsHandler.cs b/mcs/class/System.Net.Http/HeaderUtils.SocketsHandler.cs new file mode 100644 index 00000000000..6f41de93112 --- /dev/null +++ b/mcs/class/System.Net.Http/HeaderUtils.SocketsHandler.cs @@ -0,0 +1,25 @@ +using System.Collections.Generic; +using System.Net.Http.Headers; + +namespace System.Net.Http +{ + static class HeaderUtils + { + internal static bool IsContentHeader (string name) + { + return HeaderDescriptor.TryGet (name, out var descriptor) && descriptor.HeaderType == HttpHeaderType.Content; + } + + internal static string GetSingleHeaderString (string name, IEnumerable<string> values) + { + string separator = HttpHeaderParser.DefaultSeparator; + if (HeaderDescriptor.TryGet (name, out var descriptor) && + (descriptor.Parser != null) && (descriptor.Parser.SupportsMultipleValues)) { + separator = descriptor.Parser.Separator; + } + + return string.Join (separator, values); + } + } +} + diff --git a/mcs/class/System.Net.Http/HttpClientHandler.Legacy.cs b/mcs/class/System.Net.Http/HttpClientHandler.Legacy.cs new file mode 100644 index 00000000000..97904594ca3 --- /dev/null +++ b/mcs/class/System.Net.Http/HttpClientHandler.Legacy.cs @@ -0,0 +1,11 @@ +// Licensed to the .NET Foundation under one or more agreements. +// The .NET Foundation licenses this file to you under the MIT license. +// See the LICENSE file in the project root for more information. + +namespace System.Net.Http +{ + partial class HttpClientHandler : HttpMessageHandler + { + static IMonoHttpClientHandler CreateDefaultHandler () => new MonoWebRequestHandler (); + } +} diff --git a/mcs/class/System.Net.Http/HttpClientHandler.Mono.cs b/mcs/class/System.Net.Http/HttpClientHandler.Mono.cs new file mode 100644 index 00000000000..8311146f475 --- /dev/null +++ b/mcs/class/System.Net.Http/HttpClientHandler.Mono.cs @@ -0,0 +1,295 @@ +// Licensed to the .NET Foundation under one or more agreements. +// The .NET Foundation licenses this file to you under the MIT license. +// See the LICENSE file in the project root for more information. + +using System.Collections.Generic; +using System.Net.Security; +using System.Security.Authentication; +using System.Security.Cryptography.X509Certificates; +using System.Threading; +using System.Threading.Tasks; + +namespace System.Net.Http +{ + public partial class HttpClientHandler : HttpMessageHandler + { + // Only one of these two handlers will be initialized. + private readonly IMonoHttpClientHandler _monoHandler; + private readonly SocketsHttpHandler _socketsHttpHandler; + private ClientCertificateOption _clientCertificateOptions; + + public HttpClientHandler () : this (null) { } + + internal HttpClientHandler (IMonoHttpClientHandler monoHandler) + { + if (monoHandler != null) { + _monoHandler = monoHandler; + } else { + _socketsHttpHandler = new SocketsHttpHandler (); + ClientCertificateOptions = ClientCertificateOption.Manual; + } + } + + protected override void Dispose (bool disposing) + { + if (disposing) { + ((IDisposable)_monoHandler ?? _socketsHttpHandler).Dispose (); + } + base.Dispose (disposing); + } + + public virtual bool SupportsAutomaticDecompression => _monoHandler == null || _monoHandler.SupportsAutomaticDecompression; + + public virtual bool SupportsProxy => true; + + public virtual bool SupportsRedirectConfiguration => true; + + public bool UseCookies { + get => _monoHandler != null ? _monoHandler.UseCookies : _socketsHttpHandler.UseCookies; + set { + if (_monoHandler != null) { + _monoHandler.UseCookies = value; + } else { + _socketsHttpHandler.UseCookies = value; + } + } + } + + public CookieContainer CookieContainer { + get => _monoHandler != null ? _monoHandler.CookieContainer : _socketsHttpHandler.CookieContainer; + set { + if (_monoHandler != null) { + _monoHandler.CookieContainer = value; + } else { + _socketsHttpHandler.CookieContainer = value; + } + } + } + + public ClientCertificateOption ClientCertificateOptions { + get { + if (_monoHandler != null) { + return _monoHandler.ClientCertificateOptions; + } else { + return _clientCertificateOptions; + } + } + set { + if (_monoHandler != null) { + _monoHandler.ClientCertificateOptions = value; + } else { + switch (value) { + case ClientCertificateOption.Manual: + ThrowForModifiedManagedSslOptionsIfStarted (); + _clientCertificateOptions = value; + _socketsHttpHandler.SslOptions.LocalCertificateSelectionCallback = (sender, targetHost, localCertificates, remoteCertificate, acceptableIssuers) => CertificateHelper.GetEligibleClientCertificate (ClientCertificates); + break; + + case ClientCertificateOption.Automatic: + ThrowForModifiedManagedSslOptionsIfStarted (); + _clientCertificateOptions = value; + _socketsHttpHandler.SslOptions.LocalCertificateSelectionCallback = (sender, targetHost, localCertificates, remoteCertificate, acceptableIssuers) => CertificateHelper.GetEligibleClientCertificate (); + break; + + default: + throw new ArgumentOutOfRangeException (nameof (value)); + } + } + } + } + + public X509CertificateCollection ClientCertificates { + get { + if (_monoHandler != null) { + return _monoHandler.ClientCertificates; + } else { + if (ClientCertificateOptions != ClientCertificateOption.Manual) { + throw new InvalidOperationException (SR.Format (SR.net_http_invalid_enable_first, nameof (ClientCertificateOptions), nameof (ClientCertificateOption.Manual))); + } + + return _socketsHttpHandler.SslOptions.ClientCertificates ?? + (_socketsHttpHandler.SslOptions.ClientCertificates = new X509CertificateCollection ()); + } + } + } + + public Func<HttpRequestMessage, X509Certificate2, X509Chain, SslPolicyErrors, bool> ServerCertificateCustomValidationCallback { + get { + return _monoHandler != null ? + _monoHandler.ServerCertificateCustomValidationCallback : + (_socketsHttpHandler.SslOptions.RemoteCertificateValidationCallback?.Target as ConnectHelper.CertificateCallbackMapper)?.FromHttpClientHandler; + } + set { + if (_monoHandler != null) { + _monoHandler.ServerCertificateCustomValidationCallback = value; + } else { + ThrowForModifiedManagedSslOptionsIfStarted (); + _socketsHttpHandler.SslOptions.RemoteCertificateValidationCallback = value != null ? + new ConnectHelper.CertificateCallbackMapper (value).ForSocketsHttpHandler : + null; + } + } + } + + public bool CheckCertificateRevocationList { + get => _monoHandler != null ? _monoHandler.CheckCertificateRevocationList : _socketsHttpHandler.SslOptions.CertificateRevocationCheckMode == X509RevocationMode.Online; + set { + if (_monoHandler != null) { + _monoHandler.CheckCertificateRevocationList = value; + } else { + ThrowForModifiedManagedSslOptionsIfStarted (); + _socketsHttpHandler.SslOptions.CertificateRevocationCheckMode = value ? X509RevocationMode.Online : X509RevocationMode.NoCheck; + } + } + } + + public SslProtocols SslProtocols { + get => _monoHandler != null ? _monoHandler.SslProtocols : _socketsHttpHandler.SslOptions.EnabledSslProtocols; + set { + if (_monoHandler != null) { + _monoHandler.SslProtocols = value; + } else { + ThrowForModifiedManagedSslOptionsIfStarted (); + _socketsHttpHandler.SslOptions.EnabledSslProtocols = value; + } + } + } + + public DecompressionMethods AutomaticDecompression { + get => _monoHandler != null ? _monoHandler.AutomaticDecompression : _socketsHttpHandler.AutomaticDecompression; + set { + if (_monoHandler != null) { + _monoHandler.AutomaticDecompression = value; + } else { + _socketsHttpHandler.AutomaticDecompression = value; + } + } + } + + public bool UseProxy { + get => _monoHandler != null ? _monoHandler.UseProxy : _socketsHttpHandler.UseProxy; + set { + if (_monoHandler != null) { + _monoHandler.UseProxy = value; + } else { + _socketsHttpHandler.UseProxy = value; + } + } + } + + public IWebProxy Proxy { + get => _monoHandler != null ? _monoHandler.Proxy : _socketsHttpHandler.Proxy; + set { + if (_monoHandler != null) { + _monoHandler.Proxy = value; + } else { + _socketsHttpHandler.Proxy = value; + } + } + } + + public ICredentials DefaultProxyCredentials { + get => _monoHandler != null ? _monoHandler.DefaultProxyCredentials : _socketsHttpHandler.DefaultProxyCredentials; + set { + if (_monoHandler != null) { + _monoHandler.DefaultProxyCredentials = value; + } else { + _socketsHttpHandler.DefaultProxyCredentials = value; + } + } + } + + public bool PreAuthenticate { + get => _monoHandler != null ? _monoHandler.PreAuthenticate : _socketsHttpHandler.PreAuthenticate; + set { + if (_monoHandler != null) { + _monoHandler.PreAuthenticate = value; + } else { + _socketsHttpHandler.PreAuthenticate = value; + } + } + } + + public bool UseDefaultCredentials { + // Either read variable from curlHandler or compare .Credentials as socketsHttpHandler does not have separate prop. + get => _monoHandler != null ? _monoHandler.UseDefaultCredentials : _socketsHttpHandler.Credentials == CredentialCache.DefaultCredentials; + set { + if (_monoHandler != null) { + _monoHandler.UseDefaultCredentials = value; + } else { + if (value) { + _socketsHttpHandler.Credentials = CredentialCache.DefaultCredentials; + } else { + if (_socketsHttpHandler.Credentials == CredentialCache.DefaultCredentials) { + // Only clear out the Credentials property if it was a DefaultCredentials. + _socketsHttpHandler.Credentials = null; + } + } + } + } + } + + public ICredentials Credentials { + get => _monoHandler != null ? _monoHandler.Credentials : _socketsHttpHandler.Credentials; + set { + if (_monoHandler != null) { + _monoHandler.Credentials = value; + } else { + _socketsHttpHandler.Credentials = value; + } + } + } + + public bool AllowAutoRedirect { + get => _monoHandler != null ? _monoHandler.AllowAutoRedirect : _socketsHttpHandler.AllowAutoRedirect; + set { + if (_monoHandler != null) { + _monoHandler.AllowAutoRedirect = value; + } else { + _socketsHttpHandler.AllowAutoRedirect = value; + } + } + } + + public int MaxAutomaticRedirections { + get => _monoHandler != null ? _monoHandler.MaxAutomaticRedirections : _socketsHttpHandler.MaxAutomaticRedirections; + set { + if (_monoHandler != null) { + _monoHandler.MaxAutomaticRedirections = value; + } else { + _socketsHttpHandler.MaxAutomaticRedirections = value; + } + } + } + + public int MaxConnectionsPerServer { + get => _monoHandler != null ? _monoHandler.MaxConnectionsPerServer : _socketsHttpHandler.MaxConnectionsPerServer; + set { + if (_monoHandler != null) { + _monoHandler.MaxConnectionsPerServer = value; + } else { + _socketsHttpHandler.MaxConnectionsPerServer = value; + } + } + } + + public int MaxResponseHeadersLength { + get => _monoHandler != null ? _monoHandler.MaxResponseHeadersLength : _socketsHttpHandler.MaxResponseHeadersLength; + set { + if (_monoHandler != null) { + _monoHandler.MaxResponseHeadersLength = value; + } else { + _socketsHttpHandler.MaxResponseHeadersLength = value; + } + } + } + + public IDictionary<string, object> Properties => _monoHandler != null ? + _monoHandler.Properties : + _socketsHttpHandler.Properties; + + protected internal override Task<HttpResponseMessage> SendAsync (HttpRequestMessage request, CancellationToken cancellationToken) => + _monoHandler != null ? _monoHandler.SendAsync (request, cancellationToken) : + _socketsHttpHandler.SendAsync (request, cancellationToken); + } +} diff --git a/mcs/class/System.Net.Http/HttpClientHandler.SocketsHandler.cs b/mcs/class/System.Net.Http/HttpClientHandler.SocketsHandler.cs new file mode 100644 index 00000000000..4712fb0360e --- /dev/null +++ b/mcs/class/System.Net.Http/HttpClientHandler.SocketsHandler.cs @@ -0,0 +1,7 @@ +namespace System.Net.Http +{ + partial class HttpClientHandler : HttpMessageHandler + { + static IMonoHttpClientHandler CreateDefaultHandler () => new SocketsHttpHandler (); + } +} diff --git a/mcs/class/System.Net.Http/HttpClientHandler.cs b/mcs/class/System.Net.Http/HttpClientHandler.cs new file mode 100644 index 00000000000..6d8a057bcb2 --- /dev/null +++ b/mcs/class/System.Net.Http/HttpClientHandler.cs @@ -0,0 +1,194 @@ +// Licensed to the .NET Foundation under one or more agreements. +// The .NET Foundation licenses this file to you under the MIT license. +// See the LICENSE file in the project root for more information. + +using System.Collections.Generic; +using System.Net.Security; +using System.Security.Authentication; +using System.Security.Cryptography.X509Certificates; +using System.Threading; +using System.Threading.Tasks; + +namespace System.Net.Http +{ + public partial class HttpClientHandler : HttpMessageHandler + { + readonly IMonoHttpClientHandler _delegatingHandler; + ClientCertificateOption _clientCertificateOptions; + + public HttpClientHandler () : this (CreateDefaultHandler ()) { } + + internal HttpClientHandler (IMonoHttpClientHandler handler) + { + _delegatingHandler = handler; + ClientCertificateOptions = ClientCertificateOption.Manual; + } + + protected override void Dispose (bool disposing) + { + if (disposing) { + _delegatingHandler.Dispose (); + } + base.Dispose (disposing); + } + + public virtual bool SupportsAutomaticDecompression => _delegatingHandler.SupportsAutomaticDecompression; + + public virtual bool SupportsProxy => true; + + public virtual bool SupportsRedirectConfiguration => true; + + public bool UseCookies { + get => _delegatingHandler.UseCookies; + set => _delegatingHandler.UseCookies = value; + } + + public CookieContainer CookieContainer { + get => _delegatingHandler.CookieContainer; + set => _delegatingHandler.CookieContainer = value; + } + + void ThrowForModifiedManagedSslOptionsIfStarted () + { + // Hack to trigger an InvalidOperationException if a property that's stored on + // SslOptions is changed, since SslOptions itself does not do any such checks. + _delegatingHandler.SslOptions = _delegatingHandler.SslOptions; + } + + public ClientCertificateOption ClientCertificateOptions { + get { + return _clientCertificateOptions; + } + set { + switch (value) { + case ClientCertificateOption.Manual: + ThrowForModifiedManagedSslOptionsIfStarted (); + _clientCertificateOptions = value; + _delegatingHandler.SslOptions.LocalCertificateSelectionCallback = (sender, targetHost, localCertificates, remoteCertificate, acceptableIssuers) => CertificateHelper.GetEligibleClientCertificate (ClientCertificates); + break; + + case ClientCertificateOption.Automatic: + ThrowForModifiedManagedSslOptionsIfStarted (); + _clientCertificateOptions = value; + _delegatingHandler.SslOptions.LocalCertificateSelectionCallback = (sender, targetHost, localCertificates, remoteCertificate, acceptableIssuers) => CertificateHelper.GetEligibleClientCertificate (); + break; + + default: + throw new ArgumentOutOfRangeException (nameof (value)); + } + } + } + + public X509CertificateCollection ClientCertificates { + get { + if (ClientCertificateOptions != ClientCertificateOption.Manual) { + throw new InvalidOperationException (SR.Format (SR.net_http_invalid_enable_first, nameof (ClientCertificateOptions), nameof (ClientCertificateOption.Manual))); + } + + return _delegatingHandler.SslOptions.ClientCertificates ?? + (_delegatingHandler.SslOptions.ClientCertificates = new X509CertificateCollection ()); + } + } + + public Func<HttpRequestMessage, X509Certificate2, X509Chain, SslPolicyErrors, bool> ServerCertificateCustomValidationCallback { + get => (_delegatingHandler.SslOptions.RemoteCertificateValidationCallback?.Target as ConnectHelper.CertificateCallbackMapper)?.FromHttpClientHandler; + set { + ThrowForModifiedManagedSslOptionsIfStarted (); + _delegatingHandler.SslOptions.RemoteCertificateValidationCallback = value != null ? + new ConnectHelper.CertificateCallbackMapper (value).ForSocketsHttpHandler : + null; + } + } + + public bool CheckCertificateRevocationList { + get => _delegatingHandler.SslOptions.CertificateRevocationCheckMode == X509RevocationMode.Online; + set { + ThrowForModifiedManagedSslOptionsIfStarted (); + _delegatingHandler.SslOptions.CertificateRevocationCheckMode = value ? X509RevocationMode.Online : X509RevocationMode.NoCheck; + } + } + + public SslProtocols SslProtocols { + get => _delegatingHandler.SslOptions.EnabledSslProtocols; + set { + ThrowForModifiedManagedSslOptionsIfStarted (); + _delegatingHandler.SslOptions.EnabledSslProtocols = value; + } + } + + public DecompressionMethods AutomaticDecompression { + get => _delegatingHandler.AutomaticDecompression; + set => _delegatingHandler.AutomaticDecompression = value; + } + + public bool UseProxy { + get => _delegatingHandler.UseProxy; + set => _delegatingHandler.UseProxy = value; + } + + public IWebProxy Proxy { + get => _delegatingHandler.Proxy; + set => _delegatingHandler.Proxy = value; + } + + public ICredentials DefaultProxyCredentials { + get => _delegatingHandler.DefaultProxyCredentials; + set => _delegatingHandler.DefaultProxyCredentials = value; + } + + public bool PreAuthenticate { + get => _delegatingHandler.PreAuthenticate; + set => _delegatingHandler.PreAuthenticate = value; + } + + public bool UseDefaultCredentials { + // Either read variable from curlHandler or compare .Credentials as socketsHttpHandler does not have separate prop. + get => _delegatingHandler.Credentials == CredentialCache.DefaultCredentials; + set { + if (value) { + _delegatingHandler.Credentials = CredentialCache.DefaultCredentials; + } else { + if (_delegatingHandler.Credentials == CredentialCache.DefaultCredentials) { + // Only clear out the Credentials property if it was a DefaultCredentials. + _delegatingHandler.Credentials = null; + } + } + } + } + + public ICredentials Credentials { + get => _delegatingHandler.Credentials; + set => _delegatingHandler.Credentials = value; + } + + public bool AllowAutoRedirect { + get => _delegatingHandler.AllowAutoRedirect; + set => _delegatingHandler.AllowAutoRedirect = value; + } + + public int MaxAutomaticRedirections { + get => _delegatingHandler.MaxAutomaticRedirections; + set => _delegatingHandler.MaxAutomaticRedirections = value; + } + + public int MaxConnectionsPerServer { + get => _delegatingHandler.MaxConnectionsPerServer; + set => _delegatingHandler.MaxConnectionsPerServer = value; + } + + public int MaxResponseHeadersLength { + get => _delegatingHandler.MaxResponseHeadersLength; + set => _delegatingHandler.MaxResponseHeadersLength = value; + } + + public long MaxRequestContentBufferSize { + get => _delegatingHandler.MaxRequestContentBufferSize; + set => _delegatingHandler.MaxRequestContentBufferSize = value; + } + + public IDictionary<string, object> Properties => _delegatingHandler.Properties; + + protected internal override Task<HttpResponseMessage> SendAsync (HttpRequestMessage request, CancellationToken cancellationToken) => + _delegatingHandler.SendAsync (request, cancellationToken); + } +} diff --git a/mcs/class/System.Net.Http/IMonoHttpClientHandler.cs b/mcs/class/System.Net.Http/IMonoHttpClientHandler.cs new file mode 100644 index 00000000000..7422985ae40 --- /dev/null +++ b/mcs/class/System.Net.Http/IMonoHttpClientHandler.cs @@ -0,0 +1,82 @@ +// Licensed to the .NET Foundation under one or more agreements. +// The .NET Foundation licenses this file to you under the MIT license. +// See the LICENSE file in the project root for more information. + +using System.Collections.Generic; +using System.Net.Security; +using System.Security.Authentication; +using System.Security.Cryptography.X509Certificates; +using System.Threading; +using System.Threading.Tasks; + +namespace System.Net.Http +{ + interface IMonoHttpClientHandler : IDisposable + { + bool SupportsAutomaticDecompression { + get; + } + + bool UseCookies { + get; set; + } + + CookieContainer CookieContainer { + get; set; + } + + SslClientAuthenticationOptions SslOptions { + get; set; + } + + DecompressionMethods AutomaticDecompression { + get; set; + } + + bool UseProxy { + get; set; + } + + IWebProxy Proxy { + get; set; + } + + ICredentials DefaultProxyCredentials { + get; set; + } + + bool PreAuthenticate { + get; set; + } + + ICredentials Credentials { + get; set; + } + + bool AllowAutoRedirect { + get; set; + } + + int MaxAutomaticRedirections { + get; set; + } + + int MaxConnectionsPerServer { + get; set; + } + + int MaxResponseHeadersLength { + get; set; + } + + long MaxRequestContentBufferSize { + get; set; + } + + IDictionary<string, object> Properties { + get; + } + + Task<HttpResponseMessage> SendAsync (HttpRequestMessage request, CancellationToken cancellationToken); + } +} diff --git a/mcs/class/System.Net.Http/Makefile b/mcs/class/System.Net.Http/Makefile index 2ff5e417c2d..202f65ef194 100644 --- a/mcs/class/System.Net.Http/Makefile +++ b/mcs/class/System.Net.Http/Makefile @@ -1,12 +1,12 @@ thisdir = class/System.Net.Http -SUBDIRS = + include ../../build/rules.make LIBRARY = System.Net.Http.dll LIB_REFS = System.Core System KEYFILE = ../msfinal.pub -LIB_MCS_FLAGS = $(EXTRA_LIB_MCS_FLAGS) +LIB_MCS_FLAGS = $(EXTRA_LIB_MCS_FLAGS) -unsafe -nowarn:436 ifeq (monodroid,$(PROFILE)) LIB_MCS_FLAGS += -d:XAMARIN_MODERN endif @@ -16,4 +16,23 @@ TEST_MCS_FLAGS = LIBRARY_WARN_AS_ERROR = yes +EXTRA_DISTFILES = \ + TestData/testservereku.contoso.com.pfx + +ifndef SOCKETSHTTPHANDLER +TEST_MCS_FLAGS += -d:LEGACY_HTTPCLIENT +LIB_MCS_FLAGS += -d:LEGACY_HTTPCLIENT +endif + +SUBDIRS = FunctionalTests UnitTests + include ../../build/library.make + +# TEST_RUNTIME := MONO_URI_DOTNETRELATIVEORABSOLUTE=true $(TEST_RUNTIME) + +xunit-test-local: xunit-test-recursive + +run-xunit-test-local: run-xunit-test-recursive + +check: check-recursive + diff --git a/mcs/class/System.Net.Http/System.Net.Http/HttpClientHandler.cs b/mcs/class/System.Net.Http/MonoWebRequestHandler.cs index dae2cd2350a..ba66d28cf86 100644 --- a/mcs/class/System.Net.Http/System.Net.Http/HttpClientHandler.cs +++ b/mcs/class/System.Net.Http/MonoWebRequestHandler.cs @@ -1,10 +1,11 @@ // -// HttpClientHandler.cs +// MonoWebRequestHandler.cs // // Authors: // Marek Safar <marek.safar@gmail.com> +// Martin Baulig <mabaul@microsoft.com> // -// Copyright (C) 2011 Xamarin Inc (http://www.xamarin.com) +// Copyright (C) 2011-2018 Xamarin Inc (http://www.xamarin.com) // // Permission is hereby granted, free of charge, to any person obtaining // a copy of this software and associated documentation files (the @@ -29,16 +30,18 @@ using System.Collections.Generic; using System.Security.Authentication; using System.Security.Cryptography.X509Certificates; +using System.Security.Principal; using System.Threading; using System.Threading.Tasks; using System.Collections.Specialized; using System.Net.Http.Headers; +using System.Net.Cache; using System.Net.Security; using System.Linq; namespace System.Net.Http { - public class HttpClientHandler : HttpMessageHandler + class MonoWebRequestHandler : IMonoHttpClientHandler { static long groupCounter; @@ -51,20 +54,37 @@ namespace System.Net.Http bool preAuthenticate; IWebProxy proxy; bool useCookies; - bool useDefaultCredentials; bool useProxy; - ClientCertificateOption certificate; + SslClientAuthenticationOptions sslOptions; + bool allowPipelining; + RequestCachePolicy cachePolicy; + AuthenticationLevel authenticationLevel; + TimeSpan continueTimeout; + TokenImpersonationLevel impersonationLevel; + int maxResponseHeadersLength; + int readWriteTimeout; + RemoteCertificateValidationCallback serverCertificateValidationCallback; + bool unsafeAuthenticatedConnectionSharing; bool sentRequest; string connectionGroupName; bool disposed; - public HttpClientHandler () + internal MonoWebRequestHandler () { allowAutoRedirect = true; maxAutomaticRedirections = 50; maxRequestContentBufferSize = int.MaxValue; useCookies = true; useProxy = true; + allowPipelining = true; + authenticationLevel = AuthenticationLevel.MutualAuthRequested; + cachePolicy = System.Net.WebRequest.DefaultCachePolicy; + continueTimeout = TimeSpan.FromMilliseconds (350); + impersonationLevel = TokenImpersonationLevel.Delegation; + maxResponseHeadersLength = HttpWebRequest.DefaultMaximumResponseHeadersLength; + readWriteTimeout = 300000; + serverCertificateValidationCallback = null; + unsafeAuthenticatedConnectionSharing = false; connectionGroupName = "HttpClientHandler" + Interlocked.Increment (ref groupCounter); } @@ -96,16 +116,6 @@ namespace System.Net.Http } } - public ClientCertificateOption ClientCertificateOptions { - get { - return certificate; - } - set { - EnsureModifiability (); - certificate = value; - } - } - public CookieContainer CookieContainer { get { return cookieContainer ?? (cookieContainer = new CookieContainer ()); @@ -203,34 +213,113 @@ namespace System.Net.Http } } - public bool UseDefaultCredentials { + public bool UseProxy { get { - return useDefaultCredentials; + return useProxy; } set { EnsureModifiability (); - useDefaultCredentials = value; + useProxy = value; } } - public bool UseProxy { - get { - return useProxy; + public bool AllowPipelining { + get { return allowPipelining; } + set { + EnsureModifiability (); + allowPipelining = value; } + } + + public RequestCachePolicy CachePolicy { + get { return cachePolicy; } set { EnsureModifiability (); - useProxy = value; + cachePolicy = value; + } + } + + public AuthenticationLevel AuthenticationLevel { + get { return authenticationLevel; } + set { + EnsureModifiability (); + authenticationLevel = value; + } + } + + [MonoTODO] + public TimeSpan ContinueTimeout { + get { return continueTimeout; } + set { + EnsureModifiability (); + continueTimeout = value; + } + } + + public TokenImpersonationLevel ImpersonationLevel { + get { return impersonationLevel; } + set { + EnsureModifiability (); + impersonationLevel = value; + } + } + + public int MaxResponseHeadersLength { + get { return maxResponseHeadersLength; } + set { + EnsureModifiability (); + maxResponseHeadersLength = value; + } + } + + public int ReadWriteTimeout { + get { return readWriteTimeout; } + set { + EnsureModifiability (); + readWriteTimeout = value; + } + } + + public RemoteCertificateValidationCallback ServerCertificateValidationCallback { + get { return serverCertificateValidationCallback; } + set { + EnsureModifiability (); + serverCertificateValidationCallback = value; + } + } + + public bool UnsafeAuthenticatedConnectionSharing { + get { return unsafeAuthenticatedConnectionSharing; } + set { + EnsureModifiability (); + unsafeAuthenticatedConnectionSharing = value; } } - protected override void Dispose (bool disposing) + public SslClientAuthenticationOptions SslOptions { + get => sslOptions ?? (sslOptions = new SslClientAuthenticationOptions ()); + set { + EnsureModifiability (); + sslOptions = value; + } + } + + public void Dispose () + { + Dispose (true); + } + + protected virtual void Dispose (bool disposing) { if (disposing && !disposed) { Volatile.Write (ref disposed, true); ServicePointManager.CloseConnectionGroup (connectionGroupName); } + } - base.Dispose (disposing); + bool GetConnectionKeepAlive (HttpRequestHeaders headers) + { + return headers.Connection.Any (l => string.Equals (l, "Keep-Alive", StringComparison.OrdinalIgnoreCase)); } internal virtual HttpWebRequest CreateWebRequest (HttpRequestMessage request) @@ -239,12 +328,16 @@ namespace System.Net.Http wr.ThrowOnError = false; wr.AllowWriteStreamBuffering = false; + if (request.Version == HttpVersion.Version20) + wr.ProtocolVersion = HttpVersion.Version11; + else + wr.ProtocolVersion = request.Version; + wr.ConnectionGroupName = connectionGroupName; wr.Method = request.Method.Method; - wr.ProtocolVersion = request.Version; if (wr.ProtocolVersion == HttpVersion.Version10) { - wr.KeepAlive = request.Headers.ConnectionKeepAlive; + wr.KeepAlive = GetConnectionKeepAlive (request.Headers); } else { wr.KeepAlive = request.Headers.ConnectionClose != true; } @@ -264,11 +357,7 @@ namespace System.Net.Http wr.CookieContainer = CookieContainer; } - if (useDefaultCredentials) { - wr.UseDefaultCredentials = true; - } else { - wr.Credentials = credentials; - } + wr.Credentials = credentials; if (useProxy) { wr.Proxy = proxy; @@ -298,13 +387,13 @@ namespace System.Net.Http values = values.Where (l => l != "chunked"); } - var values_formated = HttpRequestHeaders.GetSingleHeaderString (header.Key, values); + var values_formated = HeaderUtils.GetSingleHeaderString (header.Key, values); if (values_formated == null) continue; headers.AddInternal (header.Key, values_formated); } - + return wr; } @@ -313,19 +402,23 @@ namespace System.Net.Http var response = new HttpResponseMessage (wr.StatusCode); response.RequestMessage = requestMessage; response.ReasonPhrase = wr.StatusDescription; +#if LEGACY_HTTPCLIENT response.Content = new StreamContent (wr.GetResponseStream (), cancellationToken); +#else + response.Content = new StreamContent (wr.GetResponseStream ()); +#endif var headers = wr.Headers; for (int i = 0; i < headers.Count; ++i) { - var key = headers.GetKey(i); + var key = headers.GetKey (i); var value = headers.GetValues (i); HttpHeaders item_headers; - if (HttpHeaders.GetKnownHeaderKind (key) == Headers.HttpHeaderKind.Content) + if (HeaderUtils.IsContentHeader (key)) item_headers = response.Content.Headers; else item_headers = response.Headers; - + item_headers.TryAddWithoutValidation (key, value); } @@ -348,7 +441,7 @@ namespace System.Net.Http } } - protected async internal override Task<HttpResponseMessage> SendAsync (HttpRequestMessage request, CancellationToken cancellationToken) + public async Task<HttpResponseMessage> SendAsync (HttpRequestMessage request, CancellationToken cancellationToken) { if (disposed) throw new ObjectDisposedException (GetType ().ToString ()); @@ -413,23 +506,8 @@ namespace System.Net.Http cancelled.SetCanceled (); return await cancelled.Task; } - - return CreateResponseMessage (wresponse, request, cancellationToken); - } - public bool CheckCertificateRevocationList { - get { - throw new NotImplementedException (); - } - set { - throw new NotImplementedException (); - } - } - - public X509CertificateCollection ClientCertificates { - get { - throw new NotImplementedException (); - } + return CreateResponseMessage (wresponse, request, cancellationToken); } public ICredentials DefaultProxyCredentials { @@ -450,37 +528,10 @@ namespace System.Net.Http } } - public int MaxResponseHeadersLength { - get { - throw new NotImplementedException (); - } - set { - throw new NotImplementedException (); - } - } - - public IDictionary<string,object> Properties { + public IDictionary<string, object> Properties { get { throw new NotImplementedException (); } } - - public Func<HttpRequestMessage,X509Certificate2,X509Chain,SslPolicyErrors,bool> ServerCertificateCustomValidationCallback { - get { - throw new NotImplementedException (); - } - set { - throw new NotImplementedException (); - } - } - - public SslProtocols SslProtocols { - get { - throw new NotImplementedException (); - } - set { - throw new NotImplementedException (); - } - } } } diff --git a/mcs/class/System.Net.Http/System.Net.Http.csproj b/mcs/class/System.Net.Http/System.Net.Http.csproj index c69c4fea79e..c7fa6ecb9b5 100644 --- a/mcs/class/System.Net.Http/System.Net.Http.csproj +++ b/mcs/class/System.Net.Http/System.Net.Http.csproj @@ -6,7 +6,7 @@ <Platform Condition=" '$(Platform)' == '' ">net_4_x</Platform>
<ProjectGuid>{4DE5B183-8B61-4159-890B-F5BD501C4507}</ProjectGuid>
<OutputType>Library</OutputType>
- <NoWarn>1699</NoWarn>
+ <NoWarn>1699,436</NoWarn>
<LangVersion>latest</LangVersion>
<HostPlatform Condition=" '$(HostPlatform)' == '' and '$(OS)' == 'Windows_NT'">win32</HostPlatform>
<HostPlatform Condition=" '$(HostPlatform)' == '' and '$(OS)' == 'Unix' and $([System.IO.File]::Exists('/usr/lib/libc.dylib'))">macos</HostPlatform>
@@ -14,6 +14,7 @@ <GenerateTargetFrameworkAttribute>false</GenerateTargetFrameworkAttribute>
<NoStdLib>True</NoStdLib>
<NoConfig>True</NoConfig>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
<AssemblyName>System.Net.Http</AssemblyName>
<TargetFrameworkVersion>v4.6.2</TargetFrameworkVersion>
<SignAssembly>true</SignAssembly>
@@ -33,47 +34,47 @@ <PropertyGroup Condition=" '$(Platform)' == 'monodroid' ">
<OutputPath>./../../class/lib/monodroid</OutputPath>
<IntermediateOutputPath>./../../class/obj/$(AssemblyName)-monodroid</IntermediateOutputPath>
- <DefineConstants>NET_1_1;NET_2_0;NET_2_1;NET_3_5;NET_4_0;NET_4_5;MONO;MOBILE;MOBILE_LEGACY;MOBILE_DYNAMIC;MONODROID;ANDROID;XAMARIN_MODERN</DefineConstants>
+ <DefineConstants>NET_1_1;NET_2_0;NET_2_1;NET_3_5;NET_4_0;NET_4_5;MONO;MOBILE;MOBILE_LEGACY;MOBILE_DYNAMIC;MONODROID;ANDROID;XAMARIN_MODERN;LEGACY_HTTPCLIENT</DefineConstants>
</PropertyGroup>
<PropertyGroup Condition=" '$(Platform)' == 'monotouch' ">
<OutputPath>./../../class/lib/monotouch</OutputPath>
<IntermediateOutputPath>./../../class/obj/$(AssemblyName)-monotouch</IntermediateOutputPath>
- <DefineConstants>NET_1_1;NET_2_0;NET_2_1;NET_3_5;NET_4_0;NET_4_5;MOBILE;MOBILE_LEGACY;MONO;MONOTOUCH;DISABLE_REMOTING;DISABLE_COM;FEATURE_INTERCEPTABLE_THREADPOOL_CALLBACK;FULL_AOT_RUNTIME</DefineConstants>
+ <DefineConstants>NET_1_1;NET_2_0;NET_2_1;NET_3_5;NET_4_0;NET_4_5;MOBILE;MOBILE_LEGACY;MONO;MONOTOUCH;DISABLE_REMOTING;DISABLE_COM;FEATURE_INTERCEPTABLE_THREADPOOL_CALLBACK;FULL_AOT_RUNTIME;LEGACY_HTTPCLIENT</DefineConstants>
</PropertyGroup>
<PropertyGroup Condition=" '$(Platform)' == 'monotouch_watch' ">
<OutputPath>./../../class/lib/monotouch_watch</OutputPath>
<IntermediateOutputPath>./../../class/obj/$(AssemblyName)-monotouch_watch</IntermediateOutputPath>
- <DefineConstants>NET_1_1;NET_2_0;NET_2_1;NET_3_5;NET_4_0;NET_4_5;MOBILE;MOBILE_LEGACY;MONO;MONOTOUCH;DISABLE_REMOTING;DISABLE_COM;FEATURE_INTERCEPTABLE_THREADPOOL_CALLBACK;FULL_AOT_RUNTIME;FEATURE_NO_BSD_SOCKETS;MONOTOUCH_WATCH</DefineConstants>
+ <DefineConstants>NET_1_1;NET_2_0;NET_2_1;NET_3_5;NET_4_0;NET_4_5;MOBILE;MOBILE_LEGACY;MONO;MONOTOUCH;DISABLE_REMOTING;DISABLE_COM;FEATURE_INTERCEPTABLE_THREADPOOL_CALLBACK;FULL_AOT_RUNTIME;FEATURE_NO_BSD_SOCKETS;MONOTOUCH_WATCH;LEGACY_HTTPCLIENT</DefineConstants>
</PropertyGroup>
<PropertyGroup Condition=" '$(Platform)' == 'monotouch_tv' ">
<OutputPath>./../../class/lib/monotouch_tv</OutputPath>
<IntermediateOutputPath>./../../class/obj/$(AssemblyName)-monotouch_tv</IntermediateOutputPath>
- <DefineConstants>NET_1_1;NET_2_0;NET_2_1;NET_3_5;NET_4_0;NET_4_5;MOBILE;MOBILE_LEGACY;MONO;MONOTOUCH;DISABLE_REMOTING;DISABLE_COM;FEATURE_INTERCEPTABLE_THREADPOOL_CALLBACK;FULL_AOT_RUNTIME;MONOTOUCH_TV</DefineConstants>
+ <DefineConstants>NET_1_1;NET_2_0;NET_2_1;NET_3_5;NET_4_0;NET_4_5;MOBILE;MOBILE_LEGACY;MONO;MONOTOUCH;DISABLE_REMOTING;DISABLE_COM;FEATURE_INTERCEPTABLE_THREADPOOL_CALLBACK;FULL_AOT_RUNTIME;MONOTOUCH_TV;LEGACY_HTTPCLIENT</DefineConstants>
</PropertyGroup>
<PropertyGroup Condition=" '$(Platform)' == 'testing_aot_full_interp' ">
<OutputPath>./../../class/lib/testing_aot_full_interp</OutputPath>
<IntermediateOutputPath>./../../class/obj/$(AssemblyName)-testing_aot_full_interp</IntermediateOutputPath>
- <DefineConstants>NET_1_1;NET_2_0;NET_2_1;NET_3_5;NET_4_0;NET_4_5;MONO;MOBILE;MOBILE_LEGACY;FULL_AOT_INTERP;DISABLE_COM</DefineConstants>
+ <DefineConstants>NET_1_1;NET_2_0;NET_2_1;NET_3_5;NET_4_0;NET_4_5;MONO;MOBILE;MOBILE_LEGACY;FULL_AOT_INTERP;DISABLE_COM;LEGACY_HTTPCLIENT</DefineConstants>
</PropertyGroup>
<PropertyGroup Condition=" '$(Platform)' == 'testing_aot_hybrid' ">
<OutputPath>./../../class/lib/testing_aot_hybrid</OutputPath>
<IntermediateOutputPath>./../../class/obj/$(AssemblyName)-testing_aot_hybrid</IntermediateOutputPath>
- <DefineConstants>NET_1_1;NET_2_0;NET_2_1;NET_3_5;NET_4_0;NET_4_5;MONO;MOBILE;MOBILE_LEGACY;MOBILE_DYNAMIC</DefineConstants>
+ <DefineConstants>NET_1_1;NET_2_0;NET_2_1;NET_3_5;NET_4_0;NET_4_5;MONO;MOBILE;MOBILE_LEGACY;MOBILE_DYNAMIC;LEGACY_HTTPCLIENT</DefineConstants>
</PropertyGroup>
<PropertyGroup Condition=" '$(Platform)' == 'testing_aot_full' ">
<OutputPath>./../../class/lib/testing_aot_full</OutputPath>
<IntermediateOutputPath>./../../class/obj/$(AssemblyName)-testing_aot_full</IntermediateOutputPath>
- <DefineConstants>NET_1_1;NET_2_0;NET_2_1;NET_3_5;NET_4_0;NET_4_5;MONO;MOBILE;MOBILE_LEGACY;FULL_AOT_DESKTOP;FULL_AOT_RUNTIME;DISABLE_REMOTING;DISABLE_COM</DefineConstants>
+ <DefineConstants>NET_1_1;NET_2_0;NET_2_1;NET_3_5;NET_4_0;NET_4_5;MONO;MOBILE;MOBILE_LEGACY;FULL_AOT_DESKTOP;FULL_AOT_RUNTIME;DISABLE_REMOTING;DISABLE_COM;LEGACY_HTTPCLIENT</DefineConstants>
</PropertyGroup>
<PropertyGroup Condition=" '$(Platform)' == 'winaot' ">
<OutputPath>./../../class/lib/winaot</OutputPath>
<IntermediateOutputPath>./../../class/obj/$(AssemblyName)-winaot</IntermediateOutputPath>
- <DefineConstants>NET_1_1;NET_2_0;NET_2_1;NET_3_5;NET_4_0;NET_4_5;MONO;MOBILE;MOBILE_LEGACY;FULL_AOT_DESKTOP;FULL_AOT_RUNTIME;DISABLE_REMOTING;DISABLE_COM;WIN_PLATFORM</DefineConstants>
+ <DefineConstants>NET_1_1;NET_2_0;NET_2_1;NET_3_5;NET_4_0;NET_4_5;MONO;MOBILE;MOBILE_LEGACY;FULL_AOT_DESKTOP;FULL_AOT_RUNTIME;DISABLE_REMOTING;DISABLE_COM;WIN_PLATFORM;LEGACY_HTTPCLIENT</DefineConstants>
</PropertyGroup>
<PropertyGroup Condition=" '$(Platform)' == 'xammac' ">
<OutputPath>./../../class/lib/xammac</OutputPath>
<IntermediateOutputPath>./../../class/obj/$(AssemblyName)-xammac</IntermediateOutputPath>
- <DefineConstants>NET_1_1;NET_2_0;NET_2_1;NET_3_5;NET_4_0;NET_4_5;MONO;MOBILE;MOBILE_DYNAMIC;XAMMAC;FEATURE_INTERCEPTABLE_THREADPOOL_CALLBACK;XAMARIN_MODERN</DefineConstants>
+ <DefineConstants>NET_1_1;NET_2_0;NET_2_1;NET_3_5;NET_4_0;NET_4_5;MONO;MOBILE;MOBILE_DYNAMIC;XAMMAC;FEATURE_INTERCEPTABLE_THREADPOOL_CALLBACK;XAMARIN_MODERN;LEGACY_HTTPCLIENT</DefineConstants>
</PropertyGroup>
<PropertyGroup Condition=" '$(Platform)' == 'xammac_net_4_5' ">
<OutputPath>./../../class/lib/xammac_net_4_5</OutputPath>
@@ -83,17 +84,17 @@ <PropertyGroup Condition=" '$(Platform)' == 'orbis' ">
<OutputPath>./../../class/lib/orbis</OutputPath>
<IntermediateOutputPath>./../../class/obj/$(AssemblyName)-orbis</IntermediateOutputPath>
- <DefineConstants>NET_1_1;NET_2_0;NET_2_1;NET_3_5;NET_4_0;NET_4_5;MONO;MOBILE;MOBILE_LEGACY;FULL_AOT_DESKTOP;FULL_AOT_RUNTIME;ORBIS;DISABLE_REMOTING;DISABLE_COM</DefineConstants>
+ <DefineConstants>NET_1_1;NET_2_0;NET_2_1;NET_3_5;NET_4_0;NET_4_5;MONO;MOBILE;MOBILE_LEGACY;FULL_AOT_DESKTOP;FULL_AOT_RUNTIME;ORBIS;DISABLE_REMOTING;DISABLE_COM;LEGACY_HTTPCLIENT</DefineConstants>
</PropertyGroup>
<PropertyGroup Condition=" '$(Platform)' == 'unreal' ">
<OutputPath>./../../class/lib/unreal</OutputPath>
<IntermediateOutputPath>./../../class/obj/$(AssemblyName)-unreal</IntermediateOutputPath>
- <DefineConstants>NET_1_1;NET_2_0;NET_2_1;MOBILE;MOBILE_DYNAMIC;NET_3_5;NET_4_0;NET_4_5;MONO</DefineConstants>
+ <DefineConstants>NET_1_1;NET_2_0;NET_2_1;MOBILE;MOBILE_DYNAMIC;NET_3_5;NET_4_0;NET_4_5;MONO;LEGACY_HTTPCLIENT</DefineConstants>
</PropertyGroup>
<PropertyGroup Condition=" '$(Platform)' == 'wasm' ">
<OutputPath>./../../class/lib/wasm</OutputPath>
<IntermediateOutputPath>./../../class/obj/$(AssemblyName)-wasm</IntermediateOutputPath>
- <DefineConstants>NET_1_1;NET_2_0;NET_2_1;NET_3_5;NET_4_0;NET_4_5;MONO;MOBILE;MOBILE_LEGACY;FULL_AOT_DESKTOP;FULL_AOT_RUNTIME;WASM;DISABLE_REMOTING;DISABLE_COM;FEATURE_NO_BSD_SOCKETS</DefineConstants>
+ <DefineConstants>NET_1_1;NET_2_0;NET_2_1;NET_3_5;NET_4_0;NET_4_5;MONO;MOBILE;MOBILE_LEGACY;FULL_AOT_DESKTOP;FULL_AOT_RUNTIME;WASM;DISABLE_REMOTING;DISABLE_COM;FEATURE_NO_BSD_SOCKETS;LEGACY_HTTPCLIENT</DefineConstants>
</PropertyGroup>
<!-- @ALL_PROFILE_PROPERTIES@ -->
<PropertyGroup Condition=" '$(Configuration)' == 'Debug' ">
@@ -111,121 +112,975 @@ <!-- @BUILT_SOURCES@ -->
<!--Common files-->
<ItemGroup>
- <Compile Include="..\..\build\common\Consts.cs" />
<Compile Include="Assembly\AssemblyInfo.cs" />
- <Compile Include="System.Net.Http.Headers\AuthenticationHeaderValue.cs" />
- <Compile Include="System.Net.Http.Headers\CacheControlHeaderValue.cs" />
- <Compile Include="System.Net.Http.Headers\CollectionExtensions.cs" />
- <Compile Include="System.Net.Http.Headers\CollectionParser.cs" />
- <Compile Include="System.Net.Http.Headers\ContentDispositionHeaderValue.cs" />
- <Compile Include="System.Net.Http.Headers\ContentRangeHeaderValue.cs" />
- <Compile Include="System.Net.Http.Headers\EntityTagHeaderValue.cs" />
- <Compile Include="System.Net.Http.Headers\HashCodeCalculator.cs" />
- <Compile Include="System.Net.Http.Headers\HeaderInfo.cs" />
- <Compile Include="System.Net.Http.Headers\HttpContentHeaders.cs" />
- <Compile Include="System.Net.Http.Headers\HttpHeaderKind.cs" />
- <Compile Include="System.Net.Http.Headers\HttpHeaderValueCollection.cs" />
- <Compile Include="System.Net.Http.Headers\HttpHeaders.cs" />
- <Compile Include="System.Net.Http.Headers\HttpRequestHeaders.cs" />
- <Compile Include="System.Net.Http.Headers\HttpResponseHeaders.cs" />
- <Compile Include="System.Net.Http.Headers\Lexer.cs" />
- <Compile Include="System.Net.Http.Headers\MediaTypeHeaderValue.cs" />
- <Compile Include="System.Net.Http.Headers\MediaTypeWithQualityHeaderValue.cs" />
- <Compile Include="System.Net.Http.Headers\NameValueHeaderValue.cs" />
- <Compile Include="System.Net.Http.Headers\NameValueWithParametersHeaderValue.cs" />
- <Compile Include="System.Net.Http.Headers\Parser.cs" />
- <Compile Include="System.Net.Http.Headers\ProductHeaderValue.cs" />
- <Compile Include="System.Net.Http.Headers\ProductInfoHeaderValue.cs" />
- <Compile Include="System.Net.Http.Headers\QualityValue.cs" />
- <Compile Include="System.Net.Http.Headers\RangeConditionHeaderValue.cs" />
- <Compile Include="System.Net.Http.Headers\RangeHeaderValue.cs" />
- <Compile Include="System.Net.Http.Headers\RangeItemHeaderValue.cs" />
- <Compile Include="System.Net.Http.Headers\RetryConditionHeaderValue.cs" />
- <Compile Include="System.Net.Http.Headers\StringWithQualityHeaderValue.cs" />
- <Compile Include="System.Net.Http.Headers\TransferCodingHeaderValue.cs" />
- <Compile Include="System.Net.Http.Headers\TransferCodingWithQualityHeaderValue.cs" />
- <Compile Include="System.Net.Http.Headers\ViaHeaderValue.cs" />
- <Compile Include="System.Net.Http.Headers\WarningHeaderValue.cs" />
- <Compile Include="System.Net.Http\ByteArrayContent.cs" />
- <Compile Include="System.Net.Http\ClientCertificateOption.cs" />
- <Compile Include="System.Net.Http\DelegatingHandler.cs" />
- <Compile Include="System.Net.Http\FormUrlEncodedContent.cs" />
- <Compile Include="System.Net.Http\HttpClient.cs" />
- <Compile Include="System.Net.Http\HttpCompletionOption.cs" />
- <Compile Include="System.Net.Http\HttpContent.cs" />
- <Compile Include="System.Net.Http\HttpMessageHandler.cs" />
- <Compile Include="System.Net.Http\HttpMessageInvoker.cs" />
- <Compile Include="System.Net.Http\HttpMethod.cs" />
- <Compile Include="System.Net.Http\HttpRequestException.cs" />
- <Compile Include="System.Net.Http\HttpRequestMessage.cs" />
- <Compile Include="System.Net.Http\HttpResponseMessage.cs" />
- <Compile Include="System.Net.Http\MessageProcessingHandler.cs" />
- <Compile Include="System.Net.Http\MultipartContent.cs" />
- <Compile Include="System.Net.Http\MultipartFormDataContent.cs" />
- <Compile Include="System.Net.Http\StreamContent.cs" />
- <Compile Include="System.Net.Http\StringContent.cs" />
- <ProjectReference Include="$(SolutionDir)\msvc\scripts\genconsts.csproj">
- <Name>genconsts</Name>
- <Project>{702AE2C0-71DD-4112-9A06-E4FABCA59986}</Project>
- <ReferenceOutputAssembly>false</ReferenceOutputAssembly>
- <CopyToOutputDirectory>Never</CopyToOutputDirectory>
- <Private>false</Private>
- </ProjectReference>
</ItemGroup>
<!--End of common files-->
<!--Per-profile files-->
<Choose>
<When Condition="'$(Platform)' == 'xammac'">
<ItemGroup>
+ <Compile Include="..\..\..\external\corefx\src\System.Net.Http\src\System\Net\Http\SocketsHttpHandler\CancellationHelper.cs" />
+ <Compile Include="..\..\..\external\corefx\src\System.Net.Http\src\System\Net\Http\SocketsHttpHandler\ConnectHelper.cs" />
+ <Compile Include="HeaderUtils.Legacy.cs" />
+ <Compile Include="HttpClientHandler.Legacy.cs" />
+ <Compile Include="HttpClientHandler.cs" />
+ <Compile Include="IMonoHttpClientHandler.cs" />
+ <Compile Include="MonoWebRequestHandler.cs" />
+ <Compile Include="System.Net.Http.Headers\AuthenticationHeaderValue.cs" />
+ <Compile Include="System.Net.Http.Headers\CacheControlHeaderValue.cs" />
+ <Compile Include="System.Net.Http.Headers\CollectionExtensions.cs" />
+ <Compile Include="System.Net.Http.Headers\CollectionParser.cs" />
+ <Compile Include="System.Net.Http.Headers\ContentDispositionHeaderValue.cs" />
+ <Compile Include="System.Net.Http.Headers\ContentRangeHeaderValue.cs" />
+ <Compile Include="System.Net.Http.Headers\EntityTagHeaderValue.cs" />
+ <Compile Include="System.Net.Http.Headers\HashCodeCalculator.cs" />
+ <Compile Include="System.Net.Http.Headers\HeaderInfo.cs" />
+ <Compile Include="System.Net.Http.Headers\HttpContentHeaders.cs" />
+ <Compile Include="System.Net.Http.Headers\HttpHeaderKind.cs" />
+ <Compile Include="System.Net.Http.Headers\HttpHeaderValueCollection.cs" />
+ <Compile Include="System.Net.Http.Headers\HttpHeaders.cs" />
+ <Compile Include="System.Net.Http.Headers\HttpRequestHeaders.cs" />
+ <Compile Include="System.Net.Http.Headers\HttpResponseHeaders.cs" />
+ <Compile Include="System.Net.Http.Headers\Lexer.cs" />
+ <Compile Include="System.Net.Http.Headers\MediaTypeHeaderValue.cs" />
+ <Compile Include="System.Net.Http.Headers\MediaTypeWithQualityHeaderValue.cs" />
+ <Compile Include="System.Net.Http.Headers\NameValueHeaderValue.cs" />
+ <Compile Include="System.Net.Http.Headers\NameValueWithParametersHeaderValue.cs" />
+ <Compile Include="System.Net.Http.Headers\Parser.cs" />
+ <Compile Include="System.Net.Http.Headers\ProductHeaderValue.cs" />
+ <Compile Include="System.Net.Http.Headers\ProductInfoHeaderValue.cs" />
+ <Compile Include="System.Net.Http.Headers\QualityValue.cs" />
+ <Compile Include="System.Net.Http.Headers\RangeConditionHeaderValue.cs" />
+ <Compile Include="System.Net.Http.Headers\RangeHeaderValue.cs" />
+ <Compile Include="System.Net.Http.Headers\RangeItemHeaderValue.cs" />
+ <Compile Include="System.Net.Http.Headers\RetryConditionHeaderValue.cs" />
+ <Compile Include="System.Net.Http.Headers\StringWithQualityHeaderValue.cs" />
+ <Compile Include="System.Net.Http.Headers\TransferCodingHeaderValue.cs" />
+ <Compile Include="System.Net.Http.Headers\TransferCodingWithQualityHeaderValue.cs" />
+ <Compile Include="System.Net.Http.Headers\ViaHeaderValue.cs" />
+ <Compile Include="System.Net.Http.Headers\WarningHeaderValue.cs" />
+ <Compile Include="System.Net.Http\ByteArrayContent.cs" />
+ <Compile Include="System.Net.Http\ClientCertificateOption.cs" />
+ <Compile Include="System.Net.Http\DelegatingHandler.cs" />
+ <Compile Include="System.Net.Http\FormUrlEncodedContent.cs" />
+ <Compile Include="System.Net.Http\HttpClient.cs" />
<Compile Include="System.Net.Http\HttpClient.mac.cs" />
- <Compile Include="System.Net.Http\HttpClientHandler.cs" />
+ <Compile Include="System.Net.Http\HttpCompletionOption.cs" />
+ <Compile Include="System.Net.Http\HttpContent.cs" />
+ <Compile Include="System.Net.Http\HttpMessageHandler.cs" />
+ <Compile Include="System.Net.Http\HttpMessageInvoker.cs" />
+ <Compile Include="System.Net.Http\HttpMethod.cs" />
+ <Compile Include="System.Net.Http\HttpRequestException.cs" />
+ <Compile Include="System.Net.Http\HttpRequestMessage.cs" />
+ <Compile Include="System.Net.Http\HttpResponseMessage.cs" />
+ <Compile Include="System.Net.Http\MessageProcessingHandler.cs" />
+ <Compile Include="System.Net.Http\MultipartContent.cs" />
+ <Compile Include="System.Net.Http\MultipartFormDataContent.cs" />
+ <Compile Include="System.Net.Http\StreamContent.cs" />
+ <Compile Include="System.Net.Http\StringContent.cs" />
</ItemGroup>
</When>
<When Condition="'$(Platform)' == 'winaot'">
<ItemGroup>
- <Compile Include="System.Net.Http\HttpClientHandler.cs" />
+ <Compile Include="..\..\..\external\corefx\src\System.Net.Http\src\System\Net\Http\SocketsHttpHandler\CancellationHelper.cs" />
+ <Compile Include="..\..\..\external\corefx\src\System.Net.Http\src\System\Net\Http\SocketsHttpHandler\ConnectHelper.cs" />
+ <Compile Include="HeaderUtils.Legacy.cs" />
+ <Compile Include="HttpClientHandler.Legacy.cs" />
+ <Compile Include="HttpClientHandler.cs" />
+ <Compile Include="IMonoHttpClientHandler.cs" />
+ <Compile Include="MonoWebRequestHandler.cs" />
+ <Compile Include="System.Net.Http.Headers\AuthenticationHeaderValue.cs" />
+ <Compile Include="System.Net.Http.Headers\CacheControlHeaderValue.cs" />
+ <Compile Include="System.Net.Http.Headers\CollectionExtensions.cs" />
+ <Compile Include="System.Net.Http.Headers\CollectionParser.cs" />
+ <Compile Include="System.Net.Http.Headers\ContentDispositionHeaderValue.cs" />
+ <Compile Include="System.Net.Http.Headers\ContentRangeHeaderValue.cs" />
+ <Compile Include="System.Net.Http.Headers\EntityTagHeaderValue.cs" />
+ <Compile Include="System.Net.Http.Headers\HashCodeCalculator.cs" />
+ <Compile Include="System.Net.Http.Headers\HeaderInfo.cs" />
+ <Compile Include="System.Net.Http.Headers\HttpContentHeaders.cs" />
+ <Compile Include="System.Net.Http.Headers\HttpHeaderKind.cs" />
+ <Compile Include="System.Net.Http.Headers\HttpHeaderValueCollection.cs" />
+ <Compile Include="System.Net.Http.Headers\HttpHeaders.cs" />
+ <Compile Include="System.Net.Http.Headers\HttpRequestHeaders.cs" />
+ <Compile Include="System.Net.Http.Headers\HttpResponseHeaders.cs" />
+ <Compile Include="System.Net.Http.Headers\Lexer.cs" />
+ <Compile Include="System.Net.Http.Headers\MediaTypeHeaderValue.cs" />
+ <Compile Include="System.Net.Http.Headers\MediaTypeWithQualityHeaderValue.cs" />
+ <Compile Include="System.Net.Http.Headers\NameValueHeaderValue.cs" />
+ <Compile Include="System.Net.Http.Headers\NameValueWithParametersHeaderValue.cs" />
+ <Compile Include="System.Net.Http.Headers\Parser.cs" />
+ <Compile Include="System.Net.Http.Headers\ProductHeaderValue.cs" />
+ <Compile Include="System.Net.Http.Headers\ProductInfoHeaderValue.cs" />
+ <Compile Include="System.Net.Http.Headers\QualityValue.cs" />
+ <Compile Include="System.Net.Http.Headers\RangeConditionHeaderValue.cs" />
+ <Compile Include="System.Net.Http.Headers\RangeHeaderValue.cs" />
+ <Compile Include="System.Net.Http.Headers\RangeItemHeaderValue.cs" />
+ <Compile Include="System.Net.Http.Headers\RetryConditionHeaderValue.cs" />
+ <Compile Include="System.Net.Http.Headers\StringWithQualityHeaderValue.cs" />
+ <Compile Include="System.Net.Http.Headers\TransferCodingHeaderValue.cs" />
+ <Compile Include="System.Net.Http.Headers\TransferCodingWithQualityHeaderValue.cs" />
+ <Compile Include="System.Net.Http.Headers\ViaHeaderValue.cs" />
+ <Compile Include="System.Net.Http.Headers\WarningHeaderValue.cs" />
+ <Compile Include="System.Net.Http\ByteArrayContent.cs" />
+ <Compile Include="System.Net.Http\ClientCertificateOption.cs" />
+ <Compile Include="System.Net.Http\DelegatingHandler.cs" />
+ <Compile Include="System.Net.Http\FormUrlEncodedContent.cs" />
+ <Compile Include="System.Net.Http\HttpClient.cs" />
+ <Compile Include="System.Net.Http\HttpCompletionOption.cs" />
+ <Compile Include="System.Net.Http\HttpContent.cs" />
+ <Compile Include="System.Net.Http\HttpMessageHandler.cs" />
+ <Compile Include="System.Net.Http\HttpMessageInvoker.cs" />
+ <Compile Include="System.Net.Http\HttpMethod.cs" />
+ <Compile Include="System.Net.Http\HttpRequestException.cs" />
+ <Compile Include="System.Net.Http\HttpRequestMessage.cs" />
+ <Compile Include="System.Net.Http\HttpResponseMessage.cs" />
+ <Compile Include="System.Net.Http\MessageProcessingHandler.cs" />
+ <Compile Include="System.Net.Http\MultipartContent.cs" />
+ <Compile Include="System.Net.Http\MultipartFormDataContent.cs" />
+ <Compile Include="System.Net.Http\StreamContent.cs" />
+ <Compile Include="System.Net.Http\StringContent.cs" />
</ItemGroup>
</When>
<When Condition="'$(Platform)' == 'wasm'">
<ItemGroup>
+ <Compile Include="..\..\..\external\corefx\src\System.Net.Http\src\System\Net\Http\SocketsHttpHandler\CancellationHelper.cs" />
+ <Compile Include="..\..\..\external\corefx\src\System.Net.Http\src\System\Net\Http\SocketsHttpHandler\ConnectHelper.cs" />
+ <Compile Include="HeaderUtils.Legacy.cs" />
+ <Compile Include="HttpClientHandler.Legacy.cs" />
+ <Compile Include="HttpClientHandler.cs" />
+ <Compile Include="IMonoHttpClientHandler.cs" />
+ <Compile Include="MonoWebRequestHandler.cs" />
+ <Compile Include="System.Net.Http.Headers\AuthenticationHeaderValue.cs" />
+ <Compile Include="System.Net.Http.Headers\CacheControlHeaderValue.cs" />
+ <Compile Include="System.Net.Http.Headers\CollectionExtensions.cs" />
+ <Compile Include="System.Net.Http.Headers\CollectionParser.cs" />
+ <Compile Include="System.Net.Http.Headers\ContentDispositionHeaderValue.cs" />
+ <Compile Include="System.Net.Http.Headers\ContentRangeHeaderValue.cs" />
+ <Compile Include="System.Net.Http.Headers\EntityTagHeaderValue.cs" />
+ <Compile Include="System.Net.Http.Headers\HashCodeCalculator.cs" />
+ <Compile Include="System.Net.Http.Headers\HeaderInfo.cs" />
+ <Compile Include="System.Net.Http.Headers\HttpContentHeaders.cs" />
+ <Compile Include="System.Net.Http.Headers\HttpHeaderKind.cs" />
+ <Compile Include="System.Net.Http.Headers\HttpHeaderValueCollection.cs" />
+ <Compile Include="System.Net.Http.Headers\HttpHeaders.cs" />
+ <Compile Include="System.Net.Http.Headers\HttpRequestHeaders.cs" />
+ <Compile Include="System.Net.Http.Headers\HttpResponseHeaders.cs" />
+ <Compile Include="System.Net.Http.Headers\Lexer.cs" />
+ <Compile Include="System.Net.Http.Headers\MediaTypeHeaderValue.cs" />
+ <Compile Include="System.Net.Http.Headers\MediaTypeWithQualityHeaderValue.cs" />
+ <Compile Include="System.Net.Http.Headers\NameValueHeaderValue.cs" />
+ <Compile Include="System.Net.Http.Headers\NameValueWithParametersHeaderValue.cs" />
+ <Compile Include="System.Net.Http.Headers\Parser.cs" />
+ <Compile Include="System.Net.Http.Headers\ProductHeaderValue.cs" />
+ <Compile Include="System.Net.Http.Headers\ProductInfoHeaderValue.cs" />
+ <Compile Include="System.Net.Http.Headers\QualityValue.cs" />
+ <Compile Include="System.Net.Http.Headers\RangeConditionHeaderValue.cs" />
+ <Compile Include="System.Net.Http.Headers\RangeHeaderValue.cs" />
+ <Compile Include="System.Net.Http.Headers\RangeItemHeaderValue.cs" />
+ <Compile Include="System.Net.Http.Headers\RetryConditionHeaderValue.cs" />
+ <Compile Include="System.Net.Http.Headers\StringWithQualityHeaderValue.cs" />
+ <Compile Include="System.Net.Http.Headers\TransferCodingHeaderValue.cs" />
+ <Compile Include="System.Net.Http.Headers\TransferCodingWithQualityHeaderValue.cs" />
+ <Compile Include="System.Net.Http.Headers\ViaHeaderValue.cs" />
+ <Compile Include="System.Net.Http.Headers\WarningHeaderValue.cs" />
+ <Compile Include="System.Net.Http\ByteArrayContent.cs" />
+ <Compile Include="System.Net.Http\ClientCertificateOption.cs" />
+ <Compile Include="System.Net.Http\DelegatingHandler.cs" />
+ <Compile Include="System.Net.Http\FormUrlEncodedContent.cs" />
+ <Compile Include="System.Net.Http\HttpClient.cs" />
<Compile Include="System.Net.Http\HttpClient.wasm.cs" />
- <Compile Include="System.Net.Http\HttpClientHandler.cs" />
+ <Compile Include="System.Net.Http\HttpCompletionOption.cs" />
+ <Compile Include="System.Net.Http\HttpContent.cs" />
+ <Compile Include="System.Net.Http\HttpMessageHandler.cs" />
+ <Compile Include="System.Net.Http\HttpMessageInvoker.cs" />
+ <Compile Include="System.Net.Http\HttpMethod.cs" />
+ <Compile Include="System.Net.Http\HttpRequestException.cs" />
+ <Compile Include="System.Net.Http\HttpRequestMessage.cs" />
+ <Compile Include="System.Net.Http\HttpResponseMessage.cs" />
+ <Compile Include="System.Net.Http\MessageProcessingHandler.cs" />
+ <Compile Include="System.Net.Http\MultipartContent.cs" />
+ <Compile Include="System.Net.Http\MultipartFormDataContent.cs" />
+ <Compile Include="System.Net.Http\StreamContent.cs" />
+ <Compile Include="System.Net.Http\StringContent.cs" />
</ItemGroup>
</When>
<When Condition="'$(Platform)' == 'unreal'">
<ItemGroup>
- <Compile Include="System.Net.Http\HttpClientHandler.cs" />
+ <Compile Include="..\..\..\external\corefx\src\System.Net.Http\src\System\Net\Http\SocketsHttpHandler\CancellationHelper.cs" />
+ <Compile Include="..\..\..\external\corefx\src\System.Net.Http\src\System\Net\Http\SocketsHttpHandler\ConnectHelper.cs" />
+ <Compile Include="HeaderUtils.Legacy.cs" />
+ <Compile Include="HttpClientHandler.Legacy.cs" />
+ <Compile Include="HttpClientHandler.cs" />
+ <Compile Include="IMonoHttpClientHandler.cs" />
+ <Compile Include="MonoWebRequestHandler.cs" />
+ <Compile Include="System.Net.Http.Headers\AuthenticationHeaderValue.cs" />
+ <Compile Include="System.Net.Http.Headers\CacheControlHeaderValue.cs" />
+ <Compile Include="System.Net.Http.Headers\CollectionExtensions.cs" />
+ <Compile Include="System.Net.Http.Headers\CollectionParser.cs" />
+ <Compile Include="System.Net.Http.Headers\ContentDispositionHeaderValue.cs" />
+ <Compile Include="System.Net.Http.Headers\ContentRangeHeaderValue.cs" />
+ <Compile Include="System.Net.Http.Headers\EntityTagHeaderValue.cs" />
+ <Compile Include="System.Net.Http.Headers\HashCodeCalculator.cs" />
+ <Compile Include="System.Net.Http.Headers\HeaderInfo.cs" />
+ <Compile Include="System.Net.Http.Headers\HttpContentHeaders.cs" />
+ <Compile Include="System.Net.Http.Headers\HttpHeaderKind.cs" />
+ <Compile Include="System.Net.Http.Headers\HttpHeaderValueCollection.cs" />
+ <Compile Include="System.Net.Http.Headers\HttpHeaders.cs" />
+ <Compile Include="System.Net.Http.Headers\HttpRequestHeaders.cs" />
+ <Compile Include="System.Net.Http.Headers\HttpResponseHeaders.cs" />
+ <Compile Include="System.Net.Http.Headers\Lexer.cs" />
+ <Compile Include="System.Net.Http.Headers\MediaTypeHeaderValue.cs" />
+ <Compile Include="System.Net.Http.Headers\MediaTypeWithQualityHeaderValue.cs" />
+ <Compile Include="System.Net.Http.Headers\NameValueHeaderValue.cs" />
+ <Compile Include="System.Net.Http.Headers\NameValueWithParametersHeaderValue.cs" />
+ <Compile Include="System.Net.Http.Headers\Parser.cs" />
+ <Compile Include="System.Net.Http.Headers\ProductHeaderValue.cs" />
+ <Compile Include="System.Net.Http.Headers\ProductInfoHeaderValue.cs" />
+ <Compile Include="System.Net.Http.Headers\QualityValue.cs" />
+ <Compile Include="System.Net.Http.Headers\RangeConditionHeaderValue.cs" />
+ <Compile Include="System.Net.Http.Headers\RangeHeaderValue.cs" />
+ <Compile Include="System.Net.Http.Headers\RangeItemHeaderValue.cs" />
+ <Compile Include="System.Net.Http.Headers\RetryConditionHeaderValue.cs" />
+ <Compile Include="System.Net.Http.Headers\StringWithQualityHeaderValue.cs" />
+ <Compile Include="System.Net.Http.Headers\TransferCodingHeaderValue.cs" />
+ <Compile Include="System.Net.Http.Headers\TransferCodingWithQualityHeaderValue.cs" />
+ <Compile Include="System.Net.Http.Headers\ViaHeaderValue.cs" />
+ <Compile Include="System.Net.Http.Headers\WarningHeaderValue.cs" />
+ <Compile Include="System.Net.Http\ByteArrayContent.cs" />
+ <Compile Include="System.Net.Http\ClientCertificateOption.cs" />
+ <Compile Include="System.Net.Http\DelegatingHandler.cs" />
+ <Compile Include="System.Net.Http\FormUrlEncodedContent.cs" />
+ <Compile Include="System.Net.Http\HttpClient.cs" />
+ <Compile Include="System.Net.Http\HttpCompletionOption.cs" />
+ <Compile Include="System.Net.Http\HttpContent.cs" />
+ <Compile Include="System.Net.Http\HttpMessageHandler.cs" />
+ <Compile Include="System.Net.Http\HttpMessageInvoker.cs" />
+ <Compile Include="System.Net.Http\HttpMethod.cs" />
+ <Compile Include="System.Net.Http\HttpRequestException.cs" />
+ <Compile Include="System.Net.Http\HttpRequestMessage.cs" />
+ <Compile Include="System.Net.Http\HttpResponseMessage.cs" />
+ <Compile Include="System.Net.Http\MessageProcessingHandler.cs" />
+ <Compile Include="System.Net.Http\MultipartContent.cs" />
+ <Compile Include="System.Net.Http\MultipartFormDataContent.cs" />
+ <Compile Include="System.Net.Http\StreamContent.cs" />
+ <Compile Include="System.Net.Http\StringContent.cs" />
</ItemGroup>
</When>
<When Condition="'$(Platform)' == 'orbis'">
<ItemGroup>
- <Compile Include="System.Net.Http\HttpClientHandler.cs" />
+ <Compile Include="..\..\..\external\corefx\src\System.Net.Http\src\System\Net\Http\SocketsHttpHandler\CancellationHelper.cs" />
+ <Compile Include="..\..\..\external\corefx\src\System.Net.Http\src\System\Net\Http\SocketsHttpHandler\ConnectHelper.cs" />
+ <Compile Include="HeaderUtils.Legacy.cs" />
+ <Compile Include="HttpClientHandler.Legacy.cs" />
+ <Compile Include="HttpClientHandler.cs" />
+ <Compile Include="IMonoHttpClientHandler.cs" />
+ <Compile Include="MonoWebRequestHandler.cs" />
+ <Compile Include="System.Net.Http.Headers\AuthenticationHeaderValue.cs" />
+ <Compile Include="System.Net.Http.Headers\CacheControlHeaderValue.cs" />
+ <Compile Include="System.Net.Http.Headers\CollectionExtensions.cs" />
+ <Compile Include="System.Net.Http.Headers\CollectionParser.cs" />
+ <Compile Include="System.Net.Http.Headers\ContentDispositionHeaderValue.cs" />
+ <Compile Include="System.Net.Http.Headers\ContentRangeHeaderValue.cs" />
+ <Compile Include="System.Net.Http.Headers\EntityTagHeaderValue.cs" />
+ <Compile Include="System.Net.Http.Headers\HashCodeCalculator.cs" />
+ <Compile Include="System.Net.Http.Headers\HeaderInfo.cs" />
+ <Compile Include="System.Net.Http.Headers\HttpContentHeaders.cs" />
+ <Compile Include="System.Net.Http.Headers\HttpHeaderKind.cs" />
+ <Compile Include="System.Net.Http.Headers\HttpHeaderValueCollection.cs" />
+ <Compile Include="System.Net.Http.Headers\HttpHeaders.cs" />
+ <Compile Include="System.Net.Http.Headers\HttpRequestHeaders.cs" />
+ <Compile Include="System.Net.Http.Headers\HttpResponseHeaders.cs" />
+ <Compile Include="System.Net.Http.Headers\Lexer.cs" />
+ <Compile Include="System.Net.Http.Headers\MediaTypeHeaderValue.cs" />
+ <Compile Include="System.Net.Http.Headers\MediaTypeWithQualityHeaderValue.cs" />
+ <Compile Include="System.Net.Http.Headers\NameValueHeaderValue.cs" />
+ <Compile Include="System.Net.Http.Headers\NameValueWithParametersHeaderValue.cs" />
+ <Compile Include="System.Net.Http.Headers\Parser.cs" />
+ <Compile Include="System.Net.Http.Headers\ProductHeaderValue.cs" />
+ <Compile Include="System.Net.Http.Headers\ProductInfoHeaderValue.cs" />
+ <Compile Include="System.Net.Http.Headers\QualityValue.cs" />
+ <Compile Include="System.Net.Http.Headers\RangeConditionHeaderValue.cs" />
+ <Compile Include="System.Net.Http.Headers\RangeHeaderValue.cs" />
+ <Compile Include="System.Net.Http.Headers\RangeItemHeaderValue.cs" />
+ <Compile Include="System.Net.Http.Headers\RetryConditionHeaderValue.cs" />
+ <Compile Include="System.Net.Http.Headers\StringWithQualityHeaderValue.cs" />
+ <Compile Include="System.Net.Http.Headers\TransferCodingHeaderValue.cs" />
+ <Compile Include="System.Net.Http.Headers\TransferCodingWithQualityHeaderValue.cs" />
+ <Compile Include="System.Net.Http.Headers\ViaHeaderValue.cs" />
+ <Compile Include="System.Net.Http.Headers\WarningHeaderValue.cs" />
+ <Compile Include="System.Net.Http\ByteArrayContent.cs" />
+ <Compile Include="System.Net.Http\ClientCertificateOption.cs" />
+ <Compile Include="System.Net.Http\DelegatingHandler.cs" />
+ <Compile Include="System.Net.Http\FormUrlEncodedContent.cs" />
+ <Compile Include="System.Net.Http\HttpClient.cs" />
+ <Compile Include="System.Net.Http\HttpCompletionOption.cs" />
+ <Compile Include="System.Net.Http\HttpContent.cs" />
+ <Compile Include="System.Net.Http\HttpMessageHandler.cs" />
+ <Compile Include="System.Net.Http\HttpMessageInvoker.cs" />
+ <Compile Include="System.Net.Http\HttpMethod.cs" />
+ <Compile Include="System.Net.Http\HttpRequestException.cs" />
+ <Compile Include="System.Net.Http\HttpRequestMessage.cs" />
+ <Compile Include="System.Net.Http\HttpResponseMessage.cs" />
+ <Compile Include="System.Net.Http\MessageProcessingHandler.cs" />
+ <Compile Include="System.Net.Http\MultipartContent.cs" />
+ <Compile Include="System.Net.Http\MultipartFormDataContent.cs" />
+ <Compile Include="System.Net.Http\StreamContent.cs" />
+ <Compile Include="System.Net.Http\StringContent.cs" />
</ItemGroup>
</When>
<When Condition="'$(Platform)' == 'net_4_x'">
- <ItemGroup>
- <Compile Include="System.Net.Http\HttpClientHandler.cs" />
- </ItemGroup>
+ <!--Per-host-platform files-->
+ <Choose>
+ <When Condition="'$(HostPlatform)' == 'win32'">
+ <ItemGroup>
+ <Compile Include="..\..\..\external\corefx\src\System.Net.Http\src\System\Net\Http\SocketsHttpHandler\CancellationHelper.cs" />
+ <Compile Include="..\..\..\external\corefx\src\System.Net.Http\src\System\Net\Http\SocketsHttpHandler\ConnectHelper.cs" />
+ <Compile Include="HeaderUtils.Legacy.cs" />
+ <Compile Include="HttpClientHandler.Legacy.cs" />
+ <Compile Include="HttpClientHandler.cs" />
+ <Compile Include="IMonoHttpClientHandler.cs" />
+ <Compile Include="MonoWebRequestHandler.cs" />
+ <Compile Include="System.Net.Http.Headers\AuthenticationHeaderValue.cs" />
+ <Compile Include="System.Net.Http.Headers\CacheControlHeaderValue.cs" />
+ <Compile Include="System.Net.Http.Headers\CollectionExtensions.cs" />
+ <Compile Include="System.Net.Http.Headers\CollectionParser.cs" />
+ <Compile Include="System.Net.Http.Headers\ContentDispositionHeaderValue.cs" />
+ <Compile Include="System.Net.Http.Headers\ContentRangeHeaderValue.cs" />
+ <Compile Include="System.Net.Http.Headers\EntityTagHeaderValue.cs" />
+ <Compile Include="System.Net.Http.Headers\HashCodeCalculator.cs" />
+ <Compile Include="System.Net.Http.Headers\HeaderInfo.cs" />
+ <Compile Include="System.Net.Http.Headers\HttpContentHeaders.cs" />
+ <Compile Include="System.Net.Http.Headers\HttpHeaderKind.cs" />
+ <Compile Include="System.Net.Http.Headers\HttpHeaderValueCollection.cs" />
+ <Compile Include="System.Net.Http.Headers\HttpHeaders.cs" />
+ <Compile Include="System.Net.Http.Headers\HttpRequestHeaders.cs" />
+ <Compile Include="System.Net.Http.Headers\HttpResponseHeaders.cs" />
+ <Compile Include="System.Net.Http.Headers\Lexer.cs" />
+ <Compile Include="System.Net.Http.Headers\MediaTypeHeaderValue.cs" />
+ <Compile Include="System.Net.Http.Headers\MediaTypeWithQualityHeaderValue.cs" />
+ <Compile Include="System.Net.Http.Headers\NameValueHeaderValue.cs" />
+ <Compile Include="System.Net.Http.Headers\NameValueWithParametersHeaderValue.cs" />
+ <Compile Include="System.Net.Http.Headers\Parser.cs" />
+ <Compile Include="System.Net.Http.Headers\ProductHeaderValue.cs" />
+ <Compile Include="System.Net.Http.Headers\ProductInfoHeaderValue.cs" />
+ <Compile Include="System.Net.Http.Headers\QualityValue.cs" />
+ <Compile Include="System.Net.Http.Headers\RangeConditionHeaderValue.cs" />
+ <Compile Include="System.Net.Http.Headers\RangeHeaderValue.cs" />
+ <Compile Include="System.Net.Http.Headers\RangeItemHeaderValue.cs" />
+ <Compile Include="System.Net.Http.Headers\RetryConditionHeaderValue.cs" />
+ <Compile Include="System.Net.Http.Headers\StringWithQualityHeaderValue.cs" />
+ <Compile Include="System.Net.Http.Headers\TransferCodingHeaderValue.cs" />
+ <Compile Include="System.Net.Http.Headers\TransferCodingWithQualityHeaderValue.cs" />
+ <Compile Include="System.Net.Http.Headers\ViaHeaderValue.cs" />
+ <Compile Include="System.Net.Http.Headers\WarningHeaderValue.cs" />
+ <Compile Include="System.Net.Http\ByteArrayContent.cs" />
+ <Compile Include="System.Net.Http\ClientCertificateOption.cs" />
+ <Compile Include="System.Net.Http\DelegatingHandler.cs" />
+ <Compile Include="System.Net.Http\FormUrlEncodedContent.cs" />
+ <Compile Include="System.Net.Http\HttpClient.cs" />
+ <Compile Include="System.Net.Http\HttpCompletionOption.cs" />
+ <Compile Include="System.Net.Http\HttpContent.cs" />
+ <Compile Include="System.Net.Http\HttpMessageHandler.cs" />
+ <Compile Include="System.Net.Http\HttpMessageInvoker.cs" />
+ <Compile Include="System.Net.Http\HttpMethod.cs" />
+ <Compile Include="System.Net.Http\HttpRequestException.cs" />
+ <Compile Include="System.Net.Http\HttpRequestMessage.cs" />
+ <Compile Include="System.Net.Http\HttpResponseMessage.cs" />
+ <Compile Include="System.Net.Http\MessageProcessingHandler.cs" />
+ <Compile Include="System.Net.Http\MultipartContent.cs" />
+ <Compile Include="System.Net.Http\MultipartFormDataContent.cs" />
+ <Compile Include="System.Net.Http\StreamContent.cs" />
+ <Compile Include="System.Net.Http\StringContent.cs" />
+ </ItemGroup>
+ </When>
+ <When Condition="'$(HostPlatform)' == 'unix'">
+ <ItemGroup>
+ <Compile Include="..\..\..\external\corefx\src\Common\src\System\Net\Http\HttpHandlerDefaults.cs" />
+ <Compile Include="..\..\..\external\corefx\src\System.Net.Http\src\System\Net\Http\ByteArrayContent.cs" />
+ <Compile Include="..\..\..\external\corefx\src\System.Net.Http\src\System\Net\Http\ByteArrayHelpers.cs" />
+ <Compile Include="..\..\..\external\corefx\src\System.Net.Http\src\System\Net\Http\ClientCertificateOption.cs" />
+ <Compile Include="..\..\..\external\corefx\src\System.Net.Http\src\System\Net\Http\DelegatingHandler.cs" />
+ <Compile Include="..\..\..\external\corefx\src\System.Net.Http\src\System\Net\Http\DiagnosticsHandlerLoggingStrings.cs" />
+ <Compile Include="..\..\..\external\corefx\src\System.Net.Http\src\System\Net\Http\FormUrlEncodedContent.cs" />
+ <Compile Include="..\..\..\external\corefx\src\System.Net.Http\src\System\Net\Http\Headers\AuthenticationHeaderValue.cs" />
+ <Compile Include="..\..\..\external\corefx\src\System.Net.Http\src\System\Net\Http\Headers\BaseHeaderParser.cs" />
+ <Compile Include="..\..\..\external\corefx\src\System.Net.Http\src\System\Net\Http\Headers\ByteArrayHeaderParser.cs" />
+ <Compile Include="..\..\..\external\corefx\src\System.Net.Http\src\System\Net\Http\Headers\CacheControlHeaderParser.cs" />
+ <Compile Include="..\..\..\external\corefx\src\System.Net.Http\src\System\Net\Http\Headers\CacheControlHeaderValue.cs" />
+ <Compile Include="..\..\..\external\corefx\src\System.Net.Http\src\System\Net\Http\Headers\ContentDispositionHeaderValue.cs" />
+ <Compile Include="..\..\..\external\corefx\src\System.Net.Http\src\System\Net\Http\Headers\ContentRangeHeaderValue.cs" />
+ <Compile Include="..\..\..\external\corefx\src\System.Net.Http\src\System\Net\Http\Headers\DateHeaderParser.cs" />
+ <Compile Include="..\..\..\external\corefx\src\System.Net.Http\src\System\Net\Http\Headers\EntityTagHeaderValue.cs" />
+ <Compile Include="..\..\..\external\corefx\src\System.Net.Http\src\System\Net\Http\Headers\GenericHeaderParser.cs" />
+ <Compile Include="..\..\..\external\corefx\src\System.Net.Http\src\System\Net\Http\Headers\HeaderDescriptor.cs" />
+ <Compile Include="..\..\..\external\corefx\src\System.Net.Http\src\System\Net\Http\Headers\HeaderUtilities.cs" />
+ <Compile Include="..\..\..\external\corefx\src\System.Net.Http\src\System\Net\Http\Headers\HttpContentHeaders.cs" />
+ <Compile Include="..\..\..\external\corefx\src\System.Net.Http\src\System\Net\Http\Headers\HttpGeneralHeaders.cs" />
+ <Compile Include="..\..\..\external\corefx\src\System.Net.Http\src\System\Net\Http\Headers\HttpHeaderParser.cs" />
+ <Compile Include="..\..\..\external\corefx\src\System.Net.Http\src\System\Net\Http\Headers\HttpHeaderType.cs" />
+ <Compile Include="..\..\..\external\corefx\src\System.Net.Http\src\System\Net\Http\Headers\HttpHeaderValueCollection.cs" />
+ <Compile Include="..\..\..\external\corefx\src\System.Net.Http\src\System\Net\Http\Headers\HttpHeaders.cs" />
+ <Compile Include="..\..\..\external\corefx\src\System.Net.Http\src\System\Net\Http\Headers\HttpRequestHeaders.cs" />
+ <Compile Include="..\..\..\external\corefx\src\System.Net.Http\src\System\Net\Http\Headers\HttpResponseHeaders.cs" />
+ <Compile Include="..\..\..\external\corefx\src\System.Net.Http\src\System\Net\Http\Headers\Int32NumberHeaderParser.cs" />
+ <Compile Include="..\..\..\external\corefx\src\System.Net.Http\src\System\Net\Http\Headers\Int64NumberHeaderParser.cs" />
+ <Compile Include="..\..\..\external\corefx\src\System.Net.Http\src\System\Net\Http\Headers\KnownHeader.cs" />
+ <Compile Include="..\..\..\external\corefx\src\System.Net.Http\src\System\Net\Http\Headers\KnownHeaders.cs" />
+ <Compile Include="..\..\..\external\corefx\src\System.Net.Http\src\System\Net\Http\Headers\MediaTypeHeaderParser.cs" />
+ <Compile Include="..\..\..\external\corefx\src\System.Net.Http\src\System\Net\Http\Headers\MediaTypeHeaderValue.cs" />
+ <Compile Include="..\..\..\external\corefx\src\System.Net.Http\src\System\Net\Http\Headers\MediaTypeWithQualityHeaderValue.cs" />
+ <Compile Include="..\..\..\external\corefx\src\System.Net.Http\src\System\Net\Http\Headers\NameValueHeaderValue.cs" />
+ <Compile Include="..\..\..\external\corefx\src\System.Net.Http\src\System\Net\Http\Headers\NameValueWithParametersHeaderValue.cs" />
+ <Compile Include="..\..\..\external\corefx\src\System.Net.Http\src\System\Net\Http\Headers\ObjectCollection.cs" />
+ <Compile Include="..\..\..\external\corefx\src\System.Net.Http\src\System\Net\Http\Headers\ProductHeaderValue.cs" />
+ <Compile Include="..\..\..\external\corefx\src\System.Net.Http\src\System\Net\Http\Headers\ProductInfoHeaderParser.cs" />
+ <Compile Include="..\..\..\external\corefx\src\System.Net.Http\src\System\Net\Http\Headers\ProductInfoHeaderValue.cs" />
+ <Compile Include="..\..\..\external\corefx\src\System.Net.Http\src\System\Net\Http\Headers\RangeConditionHeaderValue.cs" />
+ <Compile Include="..\..\..\external\corefx\src\System.Net.Http\src\System\Net\Http\Headers\RangeHeaderValue.cs" />
+ <Compile Include="..\..\..\external\corefx\src\System.Net.Http\src\System\Net\Http\Headers\RangeItemHeaderValue.cs" />
+ <Compile Include="..\..\..\external\corefx\src\System.Net.Http\src\System\Net\Http\Headers\RetryConditionHeaderValue.cs" />
+ <Compile Include="..\..\..\external\corefx\src\System.Net.Http\src\System\Net\Http\Headers\StringWithQualityHeaderValue.cs" />
+ <Compile Include="..\..\..\external\corefx\src\System.Net.Http\src\System\Net\Http\Headers\TimeSpanHeaderParser.cs" />
+ <Compile Include="..\..\..\external\corefx\src\System.Net.Http\src\System\Net\Http\Headers\TransferCodingHeaderParser.cs" />
+ <Compile Include="..\..\..\external\corefx\src\System.Net.Http\src\System\Net\Http\Headers\TransferCodingHeaderValue.cs" />
+ <Compile Include="..\..\..\external\corefx\src\System.Net.Http\src\System\Net\Http\Headers\TransferCodingWithQualityHeaderValue.cs" />
+ <Compile Include="..\..\..\external\corefx\src\System.Net.Http\src\System\Net\Http\Headers\UriHeaderParser.cs" />
+ <Compile Include="..\..\..\external\corefx\src\System.Net.Http\src\System\Net\Http\Headers\ViaHeaderValue.cs" />
+ <Compile Include="..\..\..\external\corefx\src\System.Net.Http\src\System\Net\Http\Headers\WarningHeaderValue.cs" />
+ <Compile Include="..\..\..\external\corefx\src\System.Net.Http\src\System\Net\Http\HttpClient.cs" />
+ <Compile Include="..\..\..\external\corefx\src\System.Net.Http\src\System\Net\Http\HttpClientHandler.cs" />
+ <Compile Include="..\..\..\external\corefx\src\System.Net.Http\src\System\Net\Http\HttpCompletionOption.cs" />
+ <Compile Include="..\..\..\external\corefx\src\System.Net.Http\src\System\Net\Http\HttpContent.cs" />
+ <Compile Include="..\..\..\external\corefx\src\System.Net.Http\src\System\Net\Http\HttpMessageHandler.cs" />
+ <Compile Include="..\..\..\external\corefx\src\System.Net.Http\src\System\Net\Http\HttpMessageInvoker.cs" />
+ <Compile Include="..\..\..\external\corefx\src\System.Net.Http\src\System\Net\Http\HttpMethod.cs" />
+ <Compile Include="..\..\..\external\corefx\src\System.Net.Http\src\System\Net\Http\HttpParseResult.cs" />
+ <Compile Include="..\..\..\external\corefx\src\System.Net.Http\src\System\Net\Http\HttpRequestException.cs" />
+ <Compile Include="..\..\..\external\corefx\src\System.Net.Http\src\System\Net\Http\HttpRequestMessage.cs" />
+ <Compile Include="..\..\..\external\corefx\src\System.Net.Http\src\System\Net\Http\HttpResponseMessage.cs" />
+ <Compile Include="..\..\..\external\corefx\src\System.Net.Http\src\System\Net\Http\HttpRuleParser.cs" />
+ <Compile Include="..\..\..\external\corefx\src\System.Net.Http\src\System\Net\Http\HttpUtilities.cs" />
+ <Compile Include="..\..\..\external\corefx\src\System.Net.Http\src\System\Net\Http\MessageProcessingHandler.cs" />
+ <Compile Include="..\..\..\external\corefx\src\System.Net.Http\src\System\Net\Http\MultipartContent.cs" />
+ <Compile Include="..\..\..\external\corefx\src\System.Net.Http\src\System\Net\Http\MultipartFormDataContent.cs" />
+ <Compile Include="..\..\..\external\corefx\src\System.Net.Http\src\System\Net\Http\ReadOnlyMemoryContent.cs" />
+ <Compile Include="..\..\..\external\corefx\src\System.Net.Http\src\System\Net\Http\SocketsHttpHandler\AuthenticationHelper.Digest.cs" />
+ <Compile Include="..\..\..\external\corefx\src\System.Net.Http\src\System\Net\Http\SocketsHttpHandler\AuthenticationHelper.NtAuth.cs" />
+ <Compile Include="..\..\..\external\corefx\src\System.Net.Http\src\System\Net\Http\SocketsHttpHandler\AuthenticationHelper.cs" />
+ <Compile Include="..\..\..\external\corefx\src\System.Net.Http\src\System\Net\Http\SocketsHttpHandler\CancellationHelper.cs" />
+ <Compile Include="..\..\..\external\corefx\src\System.Net.Http\src\System\Net\Http\SocketsHttpHandler\ChunkedEncodingReadStream.cs" />
+ <Compile Include="..\..\..\external\corefx\src\System.Net.Http\src\System\Net\Http\SocketsHttpHandler\ChunkedEncodingWriteStream.cs" />
+ <Compile Include="..\..\..\external\corefx\src\System.Net.Http\src\System\Net\Http\SocketsHttpHandler\ConnectHelper.cs" />
+ <Compile Include="..\..\..\external\corefx\src\System.Net.Http\src\System\Net\Http\SocketsHttpHandler\ConnectionCloseReadStream.cs" />
+ <Compile Include="..\..\..\external\corefx\src\System.Net.Http\src\System\Net\Http\SocketsHttpHandler\ContentLengthReadStream.cs" />
+ <Compile Include="..\..\..\external\corefx\src\System.Net.Http\src\System\Net\Http\SocketsHttpHandler\ContentLengthWriteStream.cs" />
+ <Compile Include="..\..\..\external\corefx\src\System.Net.Http\src\System\Net\Http\SocketsHttpHandler\CookieHelper.cs" />
+ <Compile Include="..\..\..\external\corefx\src\System.Net.Http\src\System\Net\Http\SocketsHttpHandler\DecompressionHandler.cs" />
+ <Compile Include="..\..\..\external\corefx\src\System.Net.Http\src\System\Net\Http\SocketsHttpHandler\EmptyReadStream.cs" />
+ <Compile Include="..\..\..\external\corefx\src\System.Net.Http\src\System\Net\Http\SocketsHttpHandler\HttpAuthenticatedConnectionHandler.cs" />
+ <Compile Include="..\..\..\external\corefx\src\System.Net.Http\src\System\Net\Http\SocketsHttpHandler\HttpConnection.cs" />
+ <Compile Include="..\..\..\external\corefx\src\System.Net.Http\src\System\Net\Http\SocketsHttpHandler\HttpConnectionHandler.cs" />
+ <Compile Include="..\..\..\external\corefx\src\System.Net.Http\src\System\Net\Http\SocketsHttpHandler\HttpConnectionKind.cs" />
+ <Compile Include="..\..\..\external\corefx\src\System.Net.Http\src\System\Net\Http\SocketsHttpHandler\HttpConnectionPool.cs" />
+ <Compile Include="..\..\..\external\corefx\src\System.Net.Http\src\System\Net\Http\SocketsHttpHandler\HttpConnectionPoolManager.cs" />
+ <Compile Include="..\..\..\external\corefx\src\System.Net.Http\src\System\Net\Http\SocketsHttpHandler\HttpConnectionResponseContent.cs" />
+ <Compile Include="..\..\..\external\corefx\src\System.Net.Http\src\System\Net\Http\SocketsHttpHandler\HttpConnectionSettings.cs" />
+ <Compile Include="..\..\..\external\corefx\src\System.Net.Http\src\System\Net\Http\SocketsHttpHandler\HttpContentDuplexStream.cs" />
+ <Compile Include="..\..\..\external\corefx\src\System.Net.Http\src\System\Net\Http\SocketsHttpHandler\HttpContentReadStream.cs" />
+ <Compile Include="..\..\..\external\corefx\src\System.Net.Http\src\System\Net\Http\SocketsHttpHandler\HttpContentStream.cs" />
+ <Compile Include="..\..\..\external\corefx\src\System.Net.Http\src\System\Net\Http\SocketsHttpHandler\HttpContentWriteStream.cs" />
+ <Compile Include="..\..\..\external\corefx\src\System.Net.Http\src\System\Net\Http\SocketsHttpHandler\HttpEnvironmentProxy.cs" />
+ <Compile Include="..\..\..\external\corefx\src\System.Net.Http\src\System\Net\Http\SocketsHttpHandler\RawConnectionStream.cs" />
+ <Compile Include="..\..\..\external\corefx\src\System.Net.Http\src\System\Net\Http\SocketsHttpHandler\RedirectHandler.cs" />
+ <Compile Include="..\..\..\external\corefx\src\System.Net.Http\src\System\Net\Http\SocketsHttpHandler\SocketsHttpHandler.cs" />
+ <Compile Include="..\..\..\external\corefx\src\System.Net.Http\src\System\Net\Http\SocketsHttpHandler\SystemProxyInfo.Unix.cs" />
+ <Compile Include="..\..\..\external\corefx\src\System.Net.Http\src\System\Net\Http\StreamContent.cs" />
+ <Compile Include="..\..\..\external\corefx\src\System.Net.Http\src\System\Net\Http\StreamToStreamCopy.cs" />
+ <Compile Include="..\..\..\external\corefx\src\System.Net.Http\src\System\Net\Http\StringContent.cs" />
+ <Compile Include="..\corlib\System.Diagnostics\Debug.cs" />
+ <Compile Include="HeaderUtils.SocketsHandler.cs" />
+ <Compile Include="HttpClientHandler.SocketsHandler.cs" />
+ <Compile Include="HttpClientHandler.cs" />
+ <Compile Include="IMonoHttpClientHandler.cs" />
+ <Compile Include="MonoWebRequestHandler.cs" />
+ <Compile Include="corefx\NetEventSource.Http.cs" />
+ <Compile Include="corefx\SocketsHttpHandler.Mono.cs" />
+ </ItemGroup>
+ </When>
+ <When Condition="'$(HostPlatform)' == 'macos'">
+ <ItemGroup>
+ <Compile Include="..\..\..\external\corefx\src\Common\src\System\Net\Http\HttpHandlerDefaults.cs" />
+ <Compile Include="..\..\..\external\corefx\src\System.Net.Http\src\System\Net\Http\ByteArrayContent.cs" />
+ <Compile Include="..\..\..\external\corefx\src\System.Net.Http\src\System\Net\Http\ByteArrayHelpers.cs" />
+ <Compile Include="..\..\..\external\corefx\src\System.Net.Http\src\System\Net\Http\ClientCertificateOption.cs" />
+ <Compile Include="..\..\..\external\corefx\src\System.Net.Http\src\System\Net\Http\DelegatingHandler.cs" />
+ <Compile Include="..\..\..\external\corefx\src\System.Net.Http\src\System\Net\Http\DiagnosticsHandlerLoggingStrings.cs" />
+ <Compile Include="..\..\..\external\corefx\src\System.Net.Http\src\System\Net\Http\FormUrlEncodedContent.cs" />
+ <Compile Include="..\..\..\external\corefx\src\System.Net.Http\src\System\Net\Http\Headers\AuthenticationHeaderValue.cs" />
+ <Compile Include="..\..\..\external\corefx\src\System.Net.Http\src\System\Net\Http\Headers\BaseHeaderParser.cs" />
+ <Compile Include="..\..\..\external\corefx\src\System.Net.Http\src\System\Net\Http\Headers\ByteArrayHeaderParser.cs" />
+ <Compile Include="..\..\..\external\corefx\src\System.Net.Http\src\System\Net\Http\Headers\CacheControlHeaderParser.cs" />
+ <Compile Include="..\..\..\external\corefx\src\System.Net.Http\src\System\Net\Http\Headers\CacheControlHeaderValue.cs" />
+ <Compile Include="..\..\..\external\corefx\src\System.Net.Http\src\System\Net\Http\Headers\ContentDispositionHeaderValue.cs" />
+ <Compile Include="..\..\..\external\corefx\src\System.Net.Http\src\System\Net\Http\Headers\ContentRangeHeaderValue.cs" />
+ <Compile Include="..\..\..\external\corefx\src\System.Net.Http\src\System\Net\Http\Headers\DateHeaderParser.cs" />
+ <Compile Include="..\..\..\external\corefx\src\System.Net.Http\src\System\Net\Http\Headers\EntityTagHeaderValue.cs" />
+ <Compile Include="..\..\..\external\corefx\src\System.Net.Http\src\System\Net\Http\Headers\GenericHeaderParser.cs" />
+ <Compile Include="..\..\..\external\corefx\src\System.Net.Http\src\System\Net\Http\Headers\HeaderDescriptor.cs" />
+ <Compile Include="..\..\..\external\corefx\src\System.Net.Http\src\System\Net\Http\Headers\HeaderUtilities.cs" />
+ <Compile Include="..\..\..\external\corefx\src\System.Net.Http\src\System\Net\Http\Headers\HttpContentHeaders.cs" />
+ <Compile Include="..\..\..\external\corefx\src\System.Net.Http\src\System\Net\Http\Headers\HttpGeneralHeaders.cs" />
+ <Compile Include="..\..\..\external\corefx\src\System.Net.Http\src\System\Net\Http\Headers\HttpHeaderParser.cs" />
+ <Compile Include="..\..\..\external\corefx\src\System.Net.Http\src\System\Net\Http\Headers\HttpHeaderType.cs" />
+ <Compile Include="..\..\..\external\corefx\src\System.Net.Http\src\System\Net\Http\Headers\HttpHeaderValueCollection.cs" />
+ <Compile Include="..\..\..\external\corefx\src\System.Net.Http\src\System\Net\Http\Headers\HttpHeaders.cs" />
+ <Compile Include="..\..\..\external\corefx\src\System.Net.Http\src\System\Net\Http\Headers\HttpRequestHeaders.cs" />
+ <Compile Include="..\..\..\external\corefx\src\System.Net.Http\src\System\Net\Http\Headers\HttpResponseHeaders.cs" />
+ <Compile Include="..\..\..\external\corefx\src\System.Net.Http\src\System\Net\Http\Headers\Int32NumberHeaderParser.cs" />
+ <Compile Include="..\..\..\external\corefx\src\System.Net.Http\src\System\Net\Http\Headers\Int64NumberHeaderParser.cs" />
+ <Compile Include="..\..\..\external\corefx\src\System.Net.Http\src\System\Net\Http\Headers\KnownHeader.cs" />
+ <Compile Include="..\..\..\external\corefx\src\System.Net.Http\src\System\Net\Http\Headers\KnownHeaders.cs" />
+ <Compile Include="..\..\..\external\corefx\src\System.Net.Http\src\System\Net\Http\Headers\MediaTypeHeaderParser.cs" />
+ <Compile Include="..\..\..\external\corefx\src\System.Net.Http\src\System\Net\Http\Headers\MediaTypeHeaderValue.cs" />
+ <Compile Include="..\..\..\external\corefx\src\System.Net.Http\src\System\Net\Http\Headers\MediaTypeWithQualityHeaderValue.cs" />
+ <Compile Include="..\..\..\external\corefx\src\System.Net.Http\src\System\Net\Http\Headers\NameValueHeaderValue.cs" />
+ <Compile Include="..\..\..\external\corefx\src\System.Net.Http\src\System\Net\Http\Headers\NameValueWithParametersHeaderValue.cs" />
+ <Compile Include="..\..\..\external\corefx\src\System.Net.Http\src\System\Net\Http\Headers\ObjectCollection.cs" />
+ <Compile Include="..\..\..\external\corefx\src\System.Net.Http\src\System\Net\Http\Headers\ProductHeaderValue.cs" />
+ <Compile Include="..\..\..\external\corefx\src\System.Net.Http\src\System\Net\Http\Headers\ProductInfoHeaderParser.cs" />
+ <Compile Include="..\..\..\external\corefx\src\System.Net.Http\src\System\Net\Http\Headers\ProductInfoHeaderValue.cs" />
+ <Compile Include="..\..\..\external\corefx\src\System.Net.Http\src\System\Net\Http\Headers\RangeConditionHeaderValue.cs" />
+ <Compile Include="..\..\..\external\corefx\src\System.Net.Http\src\System\Net\Http\Headers\RangeHeaderValue.cs" />
+ <Compile Include="..\..\..\external\corefx\src\System.Net.Http\src\System\Net\Http\Headers\RangeItemHeaderValue.cs" />
+ <Compile Include="..\..\..\external\corefx\src\System.Net.Http\src\System\Net\Http\Headers\RetryConditionHeaderValue.cs" />
+ <Compile Include="..\..\..\external\corefx\src\System.Net.Http\src\System\Net\Http\Headers\StringWithQualityHeaderValue.cs" />
+ <Compile Include="..\..\..\external\corefx\src\System.Net.Http\src\System\Net\Http\Headers\TimeSpanHeaderParser.cs" />
+ <Compile Include="..\..\..\external\corefx\src\System.Net.Http\src\System\Net\Http\Headers\TransferCodingHeaderParser.cs" />
+ <Compile Include="..\..\..\external\corefx\src\System.Net.Http\src\System\Net\Http\Headers\TransferCodingHeaderValue.cs" />
+ <Compile Include="..\..\..\external\corefx\src\System.Net.Http\src\System\Net\Http\Headers\TransferCodingWithQualityHeaderValue.cs" />
+ <Compile Include="..\..\..\external\corefx\src\System.Net.Http\src\System\Net\Http\Headers\UriHeaderParser.cs" />
+ <Compile Include="..\..\..\external\corefx\src\System.Net.Http\src\System\Net\Http\Headers\ViaHeaderValue.cs" />
+ <Compile Include="..\..\..\external\corefx\src\System.Net.Http\src\System\Net\Http\Headers\WarningHeaderValue.cs" />
+ <Compile Include="..\..\..\external\corefx\src\System.Net.Http\src\System\Net\Http\HttpClient.cs" />
+ <Compile Include="..\..\..\external\corefx\src\System.Net.Http\src\System\Net\Http\HttpClientHandler.cs" />
+ <Compile Include="..\..\..\external\corefx\src\System.Net.Http\src\System\Net\Http\HttpCompletionOption.cs" />
+ <Compile Include="..\..\..\external\corefx\src\System.Net.Http\src\System\Net\Http\HttpContent.cs" />
+ <Compile Include="..\..\..\external\corefx\src\System.Net.Http\src\System\Net\Http\HttpMessageHandler.cs" />
+ <Compile Include="..\..\..\external\corefx\src\System.Net.Http\src\System\Net\Http\HttpMessageInvoker.cs" />
+ <Compile Include="..\..\..\external\corefx\src\System.Net.Http\src\System\Net\Http\HttpMethod.cs" />
+ <Compile Include="..\..\..\external\corefx\src\System.Net.Http\src\System\Net\Http\HttpParseResult.cs" />
+ <Compile Include="..\..\..\external\corefx\src\System.Net.Http\src\System\Net\Http\HttpRequestException.cs" />
+ <Compile Include="..\..\..\external\corefx\src\System.Net.Http\src\System\Net\Http\HttpRequestMessage.cs" />
+ <Compile Include="..\..\..\external\corefx\src\System.Net.Http\src\System\Net\Http\HttpResponseMessage.cs" />
+ <Compile Include="..\..\..\external\corefx\src\System.Net.Http\src\System\Net\Http\HttpRuleParser.cs" />
+ <Compile Include="..\..\..\external\corefx\src\System.Net.Http\src\System\Net\Http\HttpUtilities.cs" />
+ <Compile Include="..\..\..\external\corefx\src\System.Net.Http\src\System\Net\Http\MessageProcessingHandler.cs" />
+ <Compile Include="..\..\..\external\corefx\src\System.Net.Http\src\System\Net\Http\MultipartContent.cs" />
+ <Compile Include="..\..\..\external\corefx\src\System.Net.Http\src\System\Net\Http\MultipartFormDataContent.cs" />
+ <Compile Include="..\..\..\external\corefx\src\System.Net.Http\src\System\Net\Http\ReadOnlyMemoryContent.cs" />
+ <Compile Include="..\..\..\external\corefx\src\System.Net.Http\src\System\Net\Http\SocketsHttpHandler\AuthenticationHelper.Digest.cs" />
+ <Compile Include="..\..\..\external\corefx\src\System.Net.Http\src\System\Net\Http\SocketsHttpHandler\AuthenticationHelper.NtAuth.cs" />
+ <Compile Include="..\..\..\external\corefx\src\System.Net.Http\src\System\Net\Http\SocketsHttpHandler\AuthenticationHelper.cs" />
+ <Compile Include="..\..\..\external\corefx\src\System.Net.Http\src\System\Net\Http\SocketsHttpHandler\CancellationHelper.cs" />
+ <Compile Include="..\..\..\external\corefx\src\System.Net.Http\src\System\Net\Http\SocketsHttpHandler\ChunkedEncodingReadStream.cs" />
+ <Compile Include="..\..\..\external\corefx\src\System.Net.Http\src\System\Net\Http\SocketsHttpHandler\ChunkedEncodingWriteStream.cs" />
+ <Compile Include="..\..\..\external\corefx\src\System.Net.Http\src\System\Net\Http\SocketsHttpHandler\ConnectHelper.cs" />
+ <Compile Include="..\..\..\external\corefx\src\System.Net.Http\src\System\Net\Http\SocketsHttpHandler\ConnectionCloseReadStream.cs" />
+ <Compile Include="..\..\..\external\corefx\src\System.Net.Http\src\System\Net\Http\SocketsHttpHandler\ContentLengthReadStream.cs" />
+ <Compile Include="..\..\..\external\corefx\src\System.Net.Http\src\System\Net\Http\SocketsHttpHandler\ContentLengthWriteStream.cs" />
+ <Compile Include="..\..\..\external\corefx\src\System.Net.Http\src\System\Net\Http\SocketsHttpHandler\CookieHelper.cs" />
+ <Compile Include="..\..\..\external\corefx\src\System.Net.Http\src\System\Net\Http\SocketsHttpHandler\DecompressionHandler.cs" />
+ <Compile Include="..\..\..\external\corefx\src\System.Net.Http\src\System\Net\Http\SocketsHttpHandler\EmptyReadStream.cs" />
+ <Compile Include="..\..\..\external\corefx\src\System.Net.Http\src\System\Net\Http\SocketsHttpHandler\HttpAuthenticatedConnectionHandler.cs" />
+ <Compile Include="..\..\..\external\corefx\src\System.Net.Http\src\System\Net\Http\SocketsHttpHandler\HttpConnection.cs" />
+ <Compile Include="..\..\..\external\corefx\src\System.Net.Http\src\System\Net\Http\SocketsHttpHandler\HttpConnectionHandler.cs" />
+ <Compile Include="..\..\..\external\corefx\src\System.Net.Http\src\System\Net\Http\SocketsHttpHandler\HttpConnectionKind.cs" />
+ <Compile Include="..\..\..\external\corefx\src\System.Net.Http\src\System\Net\Http\SocketsHttpHandler\HttpConnectionPool.cs" />
+ <Compile Include="..\..\..\external\corefx\src\System.Net.Http\src\System\Net\Http\SocketsHttpHandler\HttpConnectionPoolManager.cs" />
+ <Compile Include="..\..\..\external\corefx\src\System.Net.Http\src\System\Net\Http\SocketsHttpHandler\HttpConnectionResponseContent.cs" />
+ <Compile Include="..\..\..\external\corefx\src\System.Net.Http\src\System\Net\Http\SocketsHttpHandler\HttpConnectionSettings.cs" />
+ <Compile Include="..\..\..\external\corefx\src\System.Net.Http\src\System\Net\Http\SocketsHttpHandler\HttpContentDuplexStream.cs" />
+ <Compile Include="..\..\..\external\corefx\src\System.Net.Http\src\System\Net\Http\SocketsHttpHandler\HttpContentReadStream.cs" />
+ <Compile Include="..\..\..\external\corefx\src\System.Net.Http\src\System\Net\Http\SocketsHttpHandler\HttpContentStream.cs" />
+ <Compile Include="..\..\..\external\corefx\src\System.Net.Http\src\System\Net\Http\SocketsHttpHandler\HttpContentWriteStream.cs" />
+ <Compile Include="..\..\..\external\corefx\src\System.Net.Http\src\System\Net\Http\SocketsHttpHandler\HttpEnvironmentProxy.cs" />
+ <Compile Include="..\..\..\external\corefx\src\System.Net.Http\src\System\Net\Http\SocketsHttpHandler\RawConnectionStream.cs" />
+ <Compile Include="..\..\..\external\corefx\src\System.Net.Http\src\System\Net\Http\SocketsHttpHandler\RedirectHandler.cs" />
+ <Compile Include="..\..\..\external\corefx\src\System.Net.Http\src\System\Net\Http\SocketsHttpHandler\SocketsHttpHandler.cs" />
+ <Compile Include="..\..\..\external\corefx\src\System.Net.Http\src\System\Net\Http\SocketsHttpHandler\SystemProxyInfo.Unix.cs" />
+ <Compile Include="..\..\..\external\corefx\src\System.Net.Http\src\System\Net\Http\StreamContent.cs" />
+ <Compile Include="..\..\..\external\corefx\src\System.Net.Http\src\System\Net\Http\StreamToStreamCopy.cs" />
+ <Compile Include="..\..\..\external\corefx\src\System.Net.Http\src\System\Net\Http\StringContent.cs" />
+ <Compile Include="..\corlib\System.Diagnostics\Debug.cs" />
+ <Compile Include="HeaderUtils.SocketsHandler.cs" />
+ <Compile Include="HttpClientHandler.SocketsHandler.cs" />
+ <Compile Include="HttpClientHandler.cs" />
+ <Compile Include="IMonoHttpClientHandler.cs" />
+ <Compile Include="MonoWebRequestHandler.cs" />
+ <Compile Include="corefx\NetEventSource.Http.cs" />
+ <Compile Include="corefx\SocketsHttpHandler.Mono.cs" />
+ </ItemGroup>
+ </When>
+ <When Condition="'$(HostPlatform)' == 'linux'">
+ <ItemGroup>
+ <Compile Include="..\..\..\external\corefx\src\Common\src\System\Net\Http\HttpHandlerDefaults.cs" />
+ <Compile Include="..\..\..\external\corefx\src\System.Net.Http\src\System\Net\Http\ByteArrayContent.cs" />
+ <Compile Include="..\..\..\external\corefx\src\System.Net.Http\src\System\Net\Http\ByteArrayHelpers.cs" />
+ <Compile Include="..\..\..\external\corefx\src\System.Net.Http\src\System\Net\Http\ClientCertificateOption.cs" />
+ <Compile Include="..\..\..\external\corefx\src\System.Net.Http\src\System\Net\Http\DelegatingHandler.cs" />
+ <Compile Include="..\..\..\external\corefx\src\System.Net.Http\src\System\Net\Http\DiagnosticsHandlerLoggingStrings.cs" />
+ <Compile Include="..\..\..\external\corefx\src\System.Net.Http\src\System\Net\Http\FormUrlEncodedContent.cs" />
+ <Compile Include="..\..\..\external\corefx\src\System.Net.Http\src\System\Net\Http\Headers\AuthenticationHeaderValue.cs" />
+ <Compile Include="..\..\..\external\corefx\src\System.Net.Http\src\System\Net\Http\Headers\BaseHeaderParser.cs" />
+ <Compile Include="..\..\..\external\corefx\src\System.Net.Http\src\System\Net\Http\Headers\ByteArrayHeaderParser.cs" />
+ <Compile Include="..\..\..\external\corefx\src\System.Net.Http\src\System\Net\Http\Headers\CacheControlHeaderParser.cs" />
+ <Compile Include="..\..\..\external\corefx\src\System.Net.Http\src\System\Net\Http\Headers\CacheControlHeaderValue.cs" />
+ <Compile Include="..\..\..\external\corefx\src\System.Net.Http\src\System\Net\Http\Headers\ContentDispositionHeaderValue.cs" />
+ <Compile Include="..\..\..\external\corefx\src\System.Net.Http\src\System\Net\Http\Headers\ContentRangeHeaderValue.cs" />
+ <Compile Include="..\..\..\external\corefx\src\System.Net.Http\src\System\Net\Http\Headers\DateHeaderParser.cs" />
+ <Compile Include="..\..\..\external\corefx\src\System.Net.Http\src\System\Net\Http\Headers\EntityTagHeaderValue.cs" />
+ <Compile Include="..\..\..\external\corefx\src\System.Net.Http\src\System\Net\Http\Headers\GenericHeaderParser.cs" />
+ <Compile Include="..\..\..\external\corefx\src\System.Net.Http\src\System\Net\Http\Headers\HeaderDescriptor.cs" />
+ <Compile Include="..\..\..\external\corefx\src\System.Net.Http\src\System\Net\Http\Headers\HeaderUtilities.cs" />
+ <Compile Include="..\..\..\external\corefx\src\System.Net.Http\src\System\Net\Http\Headers\HttpContentHeaders.cs" />
+ <Compile Include="..\..\..\external\corefx\src\System.Net.Http\src\System\Net\Http\Headers\HttpGeneralHeaders.cs" />
+ <Compile Include="..\..\..\external\corefx\src\System.Net.Http\src\System\Net\Http\Headers\HttpHeaderParser.cs" />
+ <Compile Include="..\..\..\external\corefx\src\System.Net.Http\src\System\Net\Http\Headers\HttpHeaderType.cs" />
+ <Compile Include="..\..\..\external\corefx\src\System.Net.Http\src\System\Net\Http\Headers\HttpHeaderValueCollection.cs" />
+ <Compile Include="..\..\..\external\corefx\src\System.Net.Http\src\System\Net\Http\Headers\HttpHeaders.cs" />
+ <Compile Include="..\..\..\external\corefx\src\System.Net.Http\src\System\Net\Http\Headers\HttpRequestHeaders.cs" />
+ <Compile Include="..\..\..\external\corefx\src\System.Net.Http\src\System\Net\Http\Headers\HttpResponseHeaders.cs" />
+ <Compile Include="..\..\..\external\corefx\src\System.Net.Http\src\System\Net\Http\Headers\Int32NumberHeaderParser.cs" />
+ <Compile Include="..\..\..\external\corefx\src\System.Net.Http\src\System\Net\Http\Headers\Int64NumberHeaderParser.cs" />
+ <Compile Include="..\..\..\external\corefx\src\System.Net.Http\src\System\Net\Http\Headers\KnownHeader.cs" />
+ <Compile Include="..\..\..\external\corefx\src\System.Net.Http\src\System\Net\Http\Headers\KnownHeaders.cs" />
+ <Compile Include="..\..\..\external\corefx\src\System.Net.Http\src\System\Net\Http\Headers\MediaTypeHeaderParser.cs" />
+ <Compile Include="..\..\..\external\corefx\src\System.Net.Http\src\System\Net\Http\Headers\MediaTypeHeaderValue.cs" />
+ <Compile Include="..\..\..\external\corefx\src\System.Net.Http\src\System\Net\Http\Headers\MediaTypeWithQualityHeaderValue.cs" />
+ <Compile Include="..\..\..\external\corefx\src\System.Net.Http\src\System\Net\Http\Headers\NameValueHeaderValue.cs" />
+ <Compile Include="..\..\..\external\corefx\src\System.Net.Http\src\System\Net\Http\Headers\NameValueWithParametersHeaderValue.cs" />
+ <Compile Include="..\..\..\external\corefx\src\System.Net.Http\src\System\Net\Http\Headers\ObjectCollection.cs" />
+ <Compile Include="..\..\..\external\corefx\src\System.Net.Http\src\System\Net\Http\Headers\ProductHeaderValue.cs" />
+ <Compile Include="..\..\..\external\corefx\src\System.Net.Http\src\System\Net\Http\Headers\ProductInfoHeaderParser.cs" />
+ <Compile Include="..\..\..\external\corefx\src\System.Net.Http\src\System\Net\Http\Headers\ProductInfoHeaderValue.cs" />
+ <Compile Include="..\..\..\external\corefx\src\System.Net.Http\src\System\Net\Http\Headers\RangeConditionHeaderValue.cs" />
+ <Compile Include="..\..\..\external\corefx\src\System.Net.Http\src\System\Net\Http\Headers\RangeHeaderValue.cs" />
+ <Compile Include="..\..\..\external\corefx\src\System.Net.Http\src\System\Net\Http\Headers\RangeItemHeaderValue.cs" />
+ <Compile Include="..\..\..\external\corefx\src\System.Net.Http\src\System\Net\Http\Headers\RetryConditionHeaderValue.cs" />
+ <Compile Include="..\..\..\external\corefx\src\System.Net.Http\src\System\Net\Http\Headers\StringWithQualityHeaderValue.cs" />
+ <Compile Include="..\..\..\external\corefx\src\System.Net.Http\src\System\Net\Http\Headers\TimeSpanHeaderParser.cs" />
+ <Compile Include="..\..\..\external\corefx\src\System.Net.Http\src\System\Net\Http\Headers\TransferCodingHeaderParser.cs" />
+ <Compile Include="..\..\..\external\corefx\src\System.Net.Http\src\System\Net\Http\Headers\TransferCodingHeaderValue.cs" />
+ <Compile Include="..\..\..\external\corefx\src\System.Net.Http\src\System\Net\Http\Headers\TransferCodingWithQualityHeaderValue.cs" />
+ <Compile Include="..\..\..\external\corefx\src\System.Net.Http\src\System\Net\Http\Headers\UriHeaderParser.cs" />
+ <Compile Include="..\..\..\external\corefx\src\System.Net.Http\src\System\Net\Http\Headers\ViaHeaderValue.cs" />
+ <Compile Include="..\..\..\external\corefx\src\System.Net.Http\src\System\Net\Http\Headers\WarningHeaderValue.cs" />
+ <Compile Include="..\..\..\external\corefx\src\System.Net.Http\src\System\Net\Http\HttpClient.cs" />
+ <Compile Include="..\..\..\external\corefx\src\System.Net.Http\src\System\Net\Http\HttpClientHandler.cs" />
+ <Compile Include="..\..\..\external\corefx\src\System.Net.Http\src\System\Net\Http\HttpCompletionOption.cs" />
+ <Compile Include="..\..\..\external\corefx\src\System.Net.Http\src\System\Net\Http\HttpContent.cs" />
+ <Compile Include="..\..\..\external\corefx\src\System.Net.Http\src\System\Net\Http\HttpMessageHandler.cs" />
+ <Compile Include="..\..\..\external\corefx\src\System.Net.Http\src\System\Net\Http\HttpMessageInvoker.cs" />
+ <Compile Include="..\..\..\external\corefx\src\System.Net.Http\src\System\Net\Http\HttpMethod.cs" />
+ <Compile Include="..\..\..\external\corefx\src\System.Net.Http\src\System\Net\Http\HttpParseResult.cs" />
+ <Compile Include="..\..\..\external\corefx\src\System.Net.Http\src\System\Net\Http\HttpRequestException.cs" />
+ <Compile Include="..\..\..\external\corefx\src\System.Net.Http\src\System\Net\Http\HttpRequestMessage.cs" />
+ <Compile Include="..\..\..\external\corefx\src\System.Net.Http\src\System\Net\Http\HttpResponseMessage.cs" />
+ <Compile Include="..\..\..\external\corefx\src\System.Net.Http\src\System\Net\Http\HttpRuleParser.cs" />
+ <Compile Include="..\..\..\external\corefx\src\System.Net.Http\src\System\Net\Http\HttpUtilities.cs" />
+ <Compile Include="..\..\..\external\corefx\src\System.Net.Http\src\System\Net\Http\MessageProcessingHandler.cs" />
+ <Compile Include="..\..\..\external\corefx\src\System.Net.Http\src\System\Net\Http\MultipartContent.cs" />
+ <Compile Include="..\..\..\external\corefx\src\System.Net.Http\src\System\Net\Http\MultipartFormDataContent.cs" />
+ <Compile Include="..\..\..\external\corefx\src\System.Net.Http\src\System\Net\Http\ReadOnlyMemoryContent.cs" />
+ <Compile Include="..\..\..\external\corefx\src\System.Net.Http\src\System\Net\Http\SocketsHttpHandler\AuthenticationHelper.Digest.cs" />
+ <Compile Include="..\..\..\external\corefx\src\System.Net.Http\src\System\Net\Http\SocketsHttpHandler\AuthenticationHelper.NtAuth.cs" />
+ <Compile Include="..\..\..\external\corefx\src\System.Net.Http\src\System\Net\Http\SocketsHttpHandler\AuthenticationHelper.cs" />
+ <Compile Include="..\..\..\external\corefx\src\System.Net.Http\src\System\Net\Http\SocketsHttpHandler\CancellationHelper.cs" />
+ <Compile Include="..\..\..\external\corefx\src\System.Net.Http\src\System\Net\Http\SocketsHttpHandler\ChunkedEncodingReadStream.cs" />
+ <Compile Include="..\..\..\external\corefx\src\System.Net.Http\src\System\Net\Http\SocketsHttpHandler\ChunkedEncodingWriteStream.cs" />
+ <Compile Include="..\..\..\external\corefx\src\System.Net.Http\src\System\Net\Http\SocketsHttpHandler\ConnectHelper.cs" />
+ <Compile Include="..\..\..\external\corefx\src\System.Net.Http\src\System\Net\Http\SocketsHttpHandler\ConnectionCloseReadStream.cs" />
+ <Compile Include="..\..\..\external\corefx\src\System.Net.Http\src\System\Net\Http\SocketsHttpHandler\ContentLengthReadStream.cs" />
+ <Compile Include="..\..\..\external\corefx\src\System.Net.Http\src\System\Net\Http\SocketsHttpHandler\ContentLengthWriteStream.cs" />
+ <Compile Include="..\..\..\external\corefx\src\System.Net.Http\src\System\Net\Http\SocketsHttpHandler\CookieHelper.cs" />
+ <Compile Include="..\..\..\external\corefx\src\System.Net.Http\src\System\Net\Http\SocketsHttpHandler\DecompressionHandler.cs" />
+ <Compile Include="..\..\..\external\corefx\src\System.Net.Http\src\System\Net\Http\SocketsHttpHandler\EmptyReadStream.cs" />
+ <Compile Include="..\..\..\external\corefx\src\System.Net.Http\src\System\Net\Http\SocketsHttpHandler\HttpAuthenticatedConnectionHandler.cs" />
+ <Compile Include="..\..\..\external\corefx\src\System.Net.Http\src\System\Net\Http\SocketsHttpHandler\HttpConnection.cs" />
+ <Compile Include="..\..\..\external\corefx\src\System.Net.Http\src\System\Net\Http\SocketsHttpHandler\HttpConnectionHandler.cs" />
+ <Compile Include="..\..\..\external\corefx\src\System.Net.Http\src\System\Net\Http\SocketsHttpHandler\HttpConnectionKind.cs" />
+ <Compile Include="..\..\..\external\corefx\src\System.Net.Http\src\System\Net\Http\SocketsHttpHandler\HttpConnectionPool.cs" />
+ <Compile Include="..\..\..\external\corefx\src\System.Net.Http\src\System\Net\Http\SocketsHttpHandler\HttpConnectionPoolManager.cs" />
+ <Compile Include="..\..\..\external\corefx\src\System.Net.Http\src\System\Net\Http\SocketsHttpHandler\HttpConnectionResponseContent.cs" />
+ <Compile Include="..\..\..\external\corefx\src\System.Net.Http\src\System\Net\Http\SocketsHttpHandler\HttpConnectionSettings.cs" />
+ <Compile Include="..\..\..\external\corefx\src\System.Net.Http\src\System\Net\Http\SocketsHttpHandler\HttpContentDuplexStream.cs" />
+ <Compile Include="..\..\..\external\corefx\src\System.Net.Http\src\System\Net\Http\SocketsHttpHandler\HttpContentReadStream.cs" />
+ <Compile Include="..\..\..\external\corefx\src\System.Net.Http\src\System\Net\Http\SocketsHttpHandler\HttpContentStream.cs" />
+ <Compile Include="..\..\..\external\corefx\src\System.Net.Http\src\System\Net\Http\SocketsHttpHandler\HttpContentWriteStream.cs" />
+ <Compile Include="..\..\..\external\corefx\src\System.Net.Http\src\System\Net\Http\SocketsHttpHandler\HttpEnvironmentProxy.cs" />
+ <Compile Include="..\..\..\external\corefx\src\System.Net.Http\src\System\Net\Http\SocketsHttpHandler\RawConnectionStream.cs" />
+ <Compile Include="..\..\..\external\corefx\src\System.Net.Http\src\System\Net\Http\SocketsHttpHandler\RedirectHandler.cs" />
+ <Compile Include="..\..\..\external\corefx\src\System.Net.Http\src\System\Net\Http\SocketsHttpHandler\SocketsHttpHandler.cs" />
+ <Compile Include="..\..\..\external\corefx\src\System.Net.Http\src\System\Net\Http\SocketsHttpHandler\SystemProxyInfo.Unix.cs" />
+ <Compile Include="..\..\..\external\corefx\src\System.Net.Http\src\System\Net\Http\StreamContent.cs" />
+ <Compile Include="..\..\..\external\corefx\src\System.Net.Http\src\System\Net\Http\StreamToStreamCopy.cs" />
+ <Compile Include="..\..\..\external\corefx\src\System.Net.Http\src\System\Net\Http\StringContent.cs" />
+ <Compile Include="..\corlib\System.Diagnostics\Debug.cs" />
+ <Compile Include="HeaderUtils.SocketsHandler.cs" />
+ <Compile Include="HttpClientHandler.SocketsHandler.cs" />
+ <Compile Include="HttpClientHandler.cs" />
+ <Compile Include="IMonoHttpClientHandler.cs" />
+ <Compile Include="MonoWebRequestHandler.cs" />
+ <Compile Include="corefx\NetEventSource.Http.cs" />
+ <Compile Include="corefx\SocketsHttpHandler.Mono.cs" />
+ </ItemGroup>
+ </When>
+ </Choose>
+ <!--End of per-host-platform files-->
</When>
<When Condition="'$(Platform)' == 'monotouch_watch'">
<ItemGroup>
+ <Compile Include="HeaderUtils.Legacy.cs" />
+ <Compile Include="System.Net.Http.Headers\AuthenticationHeaderValue.cs" />
+ <Compile Include="System.Net.Http.Headers\CacheControlHeaderValue.cs" />
+ <Compile Include="System.Net.Http.Headers\CollectionExtensions.cs" />
+ <Compile Include="System.Net.Http.Headers\CollectionParser.cs" />
+ <Compile Include="System.Net.Http.Headers\ContentDispositionHeaderValue.cs" />
+ <Compile Include="System.Net.Http.Headers\ContentRangeHeaderValue.cs" />
+ <Compile Include="System.Net.Http.Headers\EntityTagHeaderValue.cs" />
+ <Compile Include="System.Net.Http.Headers\HashCodeCalculator.cs" />
+ <Compile Include="System.Net.Http.Headers\HeaderInfo.cs" />
+ <Compile Include="System.Net.Http.Headers\HttpContentHeaders.cs" />
+ <Compile Include="System.Net.Http.Headers\HttpHeaderKind.cs" />
+ <Compile Include="System.Net.Http.Headers\HttpHeaderValueCollection.cs" />
+ <Compile Include="System.Net.Http.Headers\HttpHeaders.cs" />
+ <Compile Include="System.Net.Http.Headers\HttpRequestHeaders.cs" />
+ <Compile Include="System.Net.Http.Headers\HttpResponseHeaders.cs" />
+ <Compile Include="System.Net.Http.Headers\Lexer.cs" />
+ <Compile Include="System.Net.Http.Headers\MediaTypeHeaderValue.cs" />
+ <Compile Include="System.Net.Http.Headers\MediaTypeWithQualityHeaderValue.cs" />
+ <Compile Include="System.Net.Http.Headers\NameValueHeaderValue.cs" />
+ <Compile Include="System.Net.Http.Headers\NameValueWithParametersHeaderValue.cs" />
+ <Compile Include="System.Net.Http.Headers\Parser.cs" />
+ <Compile Include="System.Net.Http.Headers\ProductHeaderValue.cs" />
+ <Compile Include="System.Net.Http.Headers\ProductInfoHeaderValue.cs" />
+ <Compile Include="System.Net.Http.Headers\QualityValue.cs" />
+ <Compile Include="System.Net.Http.Headers\RangeConditionHeaderValue.cs" />
+ <Compile Include="System.Net.Http.Headers\RangeHeaderValue.cs" />
+ <Compile Include="System.Net.Http.Headers\RangeItemHeaderValue.cs" />
+ <Compile Include="System.Net.Http.Headers\RetryConditionHeaderValue.cs" />
+ <Compile Include="System.Net.Http.Headers\StringWithQualityHeaderValue.cs" />
+ <Compile Include="System.Net.Http.Headers\TransferCodingHeaderValue.cs" />
+ <Compile Include="System.Net.Http.Headers\TransferCodingWithQualityHeaderValue.cs" />
+ <Compile Include="System.Net.Http.Headers\ViaHeaderValue.cs" />
+ <Compile Include="System.Net.Http.Headers\WarningHeaderValue.cs" />
+ <Compile Include="System.Net.Http\ByteArrayContent.cs" />
+ <Compile Include="System.Net.Http\ClientCertificateOption.cs" />
+ <Compile Include="System.Net.Http\DelegatingHandler.cs" />
+ <Compile Include="System.Net.Http\FormUrlEncodedContent.cs" />
+ <Compile Include="System.Net.Http\HttpClient.cs" />
<Compile Include="System.Net.Http\HttpClientHandler.platformnotsupported.cs" />
+ <Compile Include="System.Net.Http\HttpCompletionOption.cs" />
+ <Compile Include="System.Net.Http\HttpContent.cs" />
+ <Compile Include="System.Net.Http\HttpMessageHandler.cs" />
+ <Compile Include="System.Net.Http\HttpMessageInvoker.cs" />
+ <Compile Include="System.Net.Http\HttpMethod.cs" />
+ <Compile Include="System.Net.Http\HttpRequestException.cs" />
+ <Compile Include="System.Net.Http\HttpRequestMessage.cs" />
+ <Compile Include="System.Net.Http\HttpResponseMessage.cs" />
+ <Compile Include="System.Net.Http\MessageProcessingHandler.cs" />
+ <Compile Include="System.Net.Http\MultipartContent.cs" />
+ <Compile Include="System.Net.Http\MultipartFormDataContent.cs" />
+ <Compile Include="System.Net.Http\StreamContent.cs" />
+ <Compile Include="System.Net.Http\StringContent.cs" />
</ItemGroup>
</When>
<When Condition="'$(Platform)' == 'monotouch_tv'">
<ItemGroup>
- <Compile Include="System.Net.Http\HttpClientHandler.cs" />
+ <Compile Include="..\..\..\external\corefx\src\System.Net.Http\src\System\Net\Http\SocketsHttpHandler\CancellationHelper.cs" />
+ <Compile Include="..\..\..\external\corefx\src\System.Net.Http\src\System\Net\Http\SocketsHttpHandler\ConnectHelper.cs" />
+ <Compile Include="HeaderUtils.Legacy.cs" />
+ <Compile Include="HttpClientHandler.Legacy.cs" />
+ <Compile Include="HttpClientHandler.cs" />
+ <Compile Include="IMonoHttpClientHandler.cs" />
+ <Compile Include="MonoWebRequestHandler.cs" />
+ <Compile Include="System.Net.Http.Headers\AuthenticationHeaderValue.cs" />
+ <Compile Include="System.Net.Http.Headers\CacheControlHeaderValue.cs" />
+ <Compile Include="System.Net.Http.Headers\CollectionExtensions.cs" />
+ <Compile Include="System.Net.Http.Headers\CollectionParser.cs" />
+ <Compile Include="System.Net.Http.Headers\ContentDispositionHeaderValue.cs" />
+ <Compile Include="System.Net.Http.Headers\ContentRangeHeaderValue.cs" />
+ <Compile Include="System.Net.Http.Headers\EntityTagHeaderValue.cs" />
+ <Compile Include="System.Net.Http.Headers\HashCodeCalculator.cs" />
+ <Compile Include="System.Net.Http.Headers\HeaderInfo.cs" />
+ <Compile Include="System.Net.Http.Headers\HttpContentHeaders.cs" />
+ <Compile Include="System.Net.Http.Headers\HttpHeaderKind.cs" />
+ <Compile Include="System.Net.Http.Headers\HttpHeaderValueCollection.cs" />
+ <Compile Include="System.Net.Http.Headers\HttpHeaders.cs" />
+ <Compile Include="System.Net.Http.Headers\HttpRequestHeaders.cs" />
+ <Compile Include="System.Net.Http.Headers\HttpResponseHeaders.cs" />
+ <Compile Include="System.Net.Http.Headers\Lexer.cs" />
+ <Compile Include="System.Net.Http.Headers\MediaTypeHeaderValue.cs" />
+ <Compile Include="System.Net.Http.Headers\MediaTypeWithQualityHeaderValue.cs" />
+ <Compile Include="System.Net.Http.Headers\NameValueHeaderValue.cs" />
+ <Compile Include="System.Net.Http.Headers\NameValueWithParametersHeaderValue.cs" />
+ <Compile Include="System.Net.Http.Headers\Parser.cs" />
+ <Compile Include="System.Net.Http.Headers\ProductHeaderValue.cs" />
+ <Compile Include="System.Net.Http.Headers\ProductInfoHeaderValue.cs" />
+ <Compile Include="System.Net.Http.Headers\QualityValue.cs" />
+ <Compile Include="System.Net.Http.Headers\RangeConditionHeaderValue.cs" />
+ <Compile Include="System.Net.Http.Headers\RangeHeaderValue.cs" />
+ <Compile Include="System.Net.Http.Headers\RangeItemHeaderValue.cs" />
+ <Compile Include="System.Net.Http.Headers\RetryConditionHeaderValue.cs" />
+ <Compile Include="System.Net.Http.Headers\StringWithQualityHeaderValue.cs" />
+ <Compile Include="System.Net.Http.Headers\TransferCodingHeaderValue.cs" />
+ <Compile Include="System.Net.Http.Headers\TransferCodingWithQualityHeaderValue.cs" />
+ <Compile Include="System.Net.Http.Headers\ViaHeaderValue.cs" />
+ <Compile Include="System.Net.Http.Headers\WarningHeaderValue.cs" />
+ <Compile Include="System.Net.Http\ByteArrayContent.cs" />
+ <Compile Include="System.Net.Http\ClientCertificateOption.cs" />
+ <Compile Include="System.Net.Http\DelegatingHandler.cs" />
+ <Compile Include="System.Net.Http\FormUrlEncodedContent.cs" />
+ <Compile Include="System.Net.Http\HttpClient.cs" />
+ <Compile Include="System.Net.Http\HttpCompletionOption.cs" />
+ <Compile Include="System.Net.Http\HttpContent.cs" />
+ <Compile Include="System.Net.Http\HttpMessageHandler.cs" />
+ <Compile Include="System.Net.Http\HttpMessageInvoker.cs" />
+ <Compile Include="System.Net.Http\HttpMethod.cs" />
+ <Compile Include="System.Net.Http\HttpRequestException.cs" />
+ <Compile Include="System.Net.Http\HttpRequestMessage.cs" />
+ <Compile Include="System.Net.Http\HttpResponseMessage.cs" />
+ <Compile Include="System.Net.Http\MessageProcessingHandler.cs" />
+ <Compile Include="System.Net.Http\MultipartContent.cs" />
+ <Compile Include="System.Net.Http\MultipartFormDataContent.cs" />
+ <Compile Include="System.Net.Http\StreamContent.cs" />
+ <Compile Include="System.Net.Http\StringContent.cs" />
</ItemGroup>
</When>
<When Condition="'$(Platform)' == 'monotouch'">
<ItemGroup>
- <Compile Include="System.Net.Http\HttpClientHandler.cs" />
+ <Compile Include="..\..\..\external\corefx\src\System.Net.Http\src\System\Net\Http\SocketsHttpHandler\CancellationHelper.cs" />
+ <Compile Include="..\..\..\external\corefx\src\System.Net.Http\src\System\Net\Http\SocketsHttpHandler\ConnectHelper.cs" />
+ <Compile Include="HeaderUtils.Legacy.cs" />
+ <Compile Include="HttpClientHandler.Legacy.cs" />
+ <Compile Include="HttpClientHandler.cs" />
+ <Compile Include="IMonoHttpClientHandler.cs" />
+ <Compile Include="MonoWebRequestHandler.cs" />
+ <Compile Include="System.Net.Http.Headers\AuthenticationHeaderValue.cs" />
+ <Compile Include="System.Net.Http.Headers\CacheControlHeaderValue.cs" />
+ <Compile Include="System.Net.Http.Headers\CollectionExtensions.cs" />
+ <Compile Include="System.Net.Http.Headers\CollectionParser.cs" />
+ <Compile Include="System.Net.Http.Headers\ContentDispositionHeaderValue.cs" />
+ <Compile Include="System.Net.Http.Headers\ContentRangeHeaderValue.cs" />
+ <Compile Include="System.Net.Http.Headers\EntityTagHeaderValue.cs" />
+ <Compile Include="System.Net.Http.Headers\HashCodeCalculator.cs" />
+ <Compile Include="System.Net.Http.Headers\HeaderInfo.cs" />
+ <Compile Include="System.Net.Http.Headers\HttpContentHeaders.cs" />
+ <Compile Include="System.Net.Http.Headers\HttpHeaderKind.cs" />
+ <Compile Include="System.Net.Http.Headers\HttpHeaderValueCollection.cs" />
+ <Compile Include="System.Net.Http.Headers\HttpHeaders.cs" />
+ <Compile Include="System.Net.Http.Headers\HttpRequestHeaders.cs" />
+ <Compile Include="System.Net.Http.Headers\HttpResponseHeaders.cs" />
+ <Compile Include="System.Net.Http.Headers\Lexer.cs" />
+ <Compile Include="System.Net.Http.Headers\MediaTypeHeaderValue.cs" />
+ <Compile Include="System.Net.Http.Headers\MediaTypeWithQualityHeaderValue.cs" />
+ <Compile Include="System.Net.Http.Headers\NameValueHeaderValue.cs" />
+ <Compile Include="System.Net.Http.Headers\NameValueWithParametersHeaderValue.cs" />
+ <Compile Include="System.Net.Http.Headers\Parser.cs" />
+ <Compile Include="System.Net.Http.Headers\ProductHeaderValue.cs" />
+ <Compile Include="System.Net.Http.Headers\ProductInfoHeaderValue.cs" />
+ <Compile Include="System.Net.Http.Headers\QualityValue.cs" />
+ <Compile Include="System.Net.Http.Headers\RangeConditionHeaderValue.cs" />
+ <Compile Include="System.Net.Http.Headers\RangeHeaderValue.cs" />
+ <Compile Include="System.Net.Http.Headers\RangeItemHeaderValue.cs" />
+ <Compile Include="System.Net.Http.Headers\RetryConditionHeaderValue.cs" />
+ <Compile Include="System.Net.Http.Headers\StringWithQualityHeaderValue.cs" />
+ <Compile Include="System.Net.Http.Headers\TransferCodingHeaderValue.cs" />
+ <Compile Include="System.Net.Http.Headers\TransferCodingWithQualityHeaderValue.cs" />
+ <Compile Include="System.Net.Http.Headers\ViaHeaderValue.cs" />
+ <Compile Include="System.Net.Http.Headers\WarningHeaderValue.cs" />
+ <Compile Include="System.Net.Http\ByteArrayContent.cs" />
+ <Compile Include="System.Net.Http\ClientCertificateOption.cs" />
+ <Compile Include="System.Net.Http\DelegatingHandler.cs" />
+ <Compile Include="System.Net.Http\FormUrlEncodedContent.cs" />
+ <Compile Include="System.Net.Http\HttpClient.cs" />
+ <Compile Include="System.Net.Http\HttpCompletionOption.cs" />
+ <Compile Include="System.Net.Http\HttpContent.cs" />
+ <Compile Include="System.Net.Http\HttpMessageHandler.cs" />
+ <Compile Include="System.Net.Http\HttpMessageInvoker.cs" />
+ <Compile Include="System.Net.Http\HttpMethod.cs" />
+ <Compile Include="System.Net.Http\HttpRequestException.cs" />
+ <Compile Include="System.Net.Http\HttpRequestMessage.cs" />
+ <Compile Include="System.Net.Http\HttpResponseMessage.cs" />
+ <Compile Include="System.Net.Http\MessageProcessingHandler.cs" />
+ <Compile Include="System.Net.Http\MultipartContent.cs" />
+ <Compile Include="System.Net.Http\MultipartFormDataContent.cs" />
+ <Compile Include="System.Net.Http\StreamContent.cs" />
+ <Compile Include="System.Net.Http\StringContent.cs" />
</ItemGroup>
</When>
<When Condition="'$(Platform)' == 'monodroid'">
<ItemGroup>
+ <Compile Include="..\..\..\external\corefx\src\System.Net.Http\src\System\Net\Http\SocketsHttpHandler\CancellationHelper.cs" />
+ <Compile Include="..\..\..\external\corefx\src\System.Net.Http\src\System\Net\Http\SocketsHttpHandler\ConnectHelper.cs" />
+ <Compile Include="HeaderUtils.Legacy.cs" />
+ <Compile Include="HttpClientHandler.Legacy.cs" />
+ <Compile Include="HttpClientHandler.cs" />
+ <Compile Include="IMonoHttpClientHandler.cs" />
+ <Compile Include="MonoWebRequestHandler.cs" />
+ <Compile Include="System.Net.Http.Headers\AuthenticationHeaderValue.cs" />
+ <Compile Include="System.Net.Http.Headers\CacheControlHeaderValue.cs" />
+ <Compile Include="System.Net.Http.Headers\CollectionExtensions.cs" />
+ <Compile Include="System.Net.Http.Headers\CollectionParser.cs" />
+ <Compile Include="System.Net.Http.Headers\ContentDispositionHeaderValue.cs" />
+ <Compile Include="System.Net.Http.Headers\ContentRangeHeaderValue.cs" />
+ <Compile Include="System.Net.Http.Headers\EntityTagHeaderValue.cs" />
+ <Compile Include="System.Net.Http.Headers\HashCodeCalculator.cs" />
+ <Compile Include="System.Net.Http.Headers\HeaderInfo.cs" />
+ <Compile Include="System.Net.Http.Headers\HttpContentHeaders.cs" />
+ <Compile Include="System.Net.Http.Headers\HttpHeaderKind.cs" />
+ <Compile Include="System.Net.Http.Headers\HttpHeaderValueCollection.cs" />
+ <Compile Include="System.Net.Http.Headers\HttpHeaders.cs" />
+ <Compile Include="System.Net.Http.Headers\HttpRequestHeaders.cs" />
+ <Compile Include="System.Net.Http.Headers\HttpResponseHeaders.cs" />
+ <Compile Include="System.Net.Http.Headers\Lexer.cs" />
+ <Compile Include="System.Net.Http.Headers\MediaTypeHeaderValue.cs" />
+ <Compile Include="System.Net.Http.Headers\MediaTypeWithQualityHeaderValue.cs" />
+ <Compile Include="System.Net.Http.Headers\NameValueHeaderValue.cs" />
+ <Compile Include="System.Net.Http.Headers\NameValueWithParametersHeaderValue.cs" />
+ <Compile Include="System.Net.Http.Headers\Parser.cs" />
+ <Compile Include="System.Net.Http.Headers\ProductHeaderValue.cs" />
+ <Compile Include="System.Net.Http.Headers\ProductInfoHeaderValue.cs" />
+ <Compile Include="System.Net.Http.Headers\QualityValue.cs" />
+ <Compile Include="System.Net.Http.Headers\RangeConditionHeaderValue.cs" />
+ <Compile Include="System.Net.Http.Headers\RangeHeaderValue.cs" />
+ <Compile Include="System.Net.Http.Headers\RangeItemHeaderValue.cs" />
+ <Compile Include="System.Net.Http.Headers\RetryConditionHeaderValue.cs" />
+ <Compile Include="System.Net.Http.Headers\StringWithQualityHeaderValue.cs" />
+ <Compile Include="System.Net.Http.Headers\TransferCodingHeaderValue.cs" />
+ <Compile Include="System.Net.Http.Headers\TransferCodingWithQualityHeaderValue.cs" />
+ <Compile Include="System.Net.Http.Headers\ViaHeaderValue.cs" />
+ <Compile Include="System.Net.Http.Headers\WarningHeaderValue.cs" />
+ <Compile Include="System.Net.Http\ByteArrayContent.cs" />
+ <Compile Include="System.Net.Http\ClientCertificateOption.cs" />
+ <Compile Include="System.Net.Http\DelegatingHandler.cs" />
+ <Compile Include="System.Net.Http\FormUrlEncodedContent.cs" />
<Compile Include="System.Net.Http\HttpClient.android.cs" />
- <Compile Include="System.Net.Http\HttpClientHandler.cs" />
+ <Compile Include="System.Net.Http\HttpClient.cs" />
+ <Compile Include="System.Net.Http\HttpCompletionOption.cs" />
+ <Compile Include="System.Net.Http\HttpContent.cs" />
+ <Compile Include="System.Net.Http\HttpMessageHandler.cs" />
+ <Compile Include="System.Net.Http\HttpMessageInvoker.cs" />
+ <Compile Include="System.Net.Http\HttpMethod.cs" />
+ <Compile Include="System.Net.Http\HttpRequestException.cs" />
+ <Compile Include="System.Net.Http\HttpRequestMessage.cs" />
+ <Compile Include="System.Net.Http\HttpResponseMessage.cs" />
+ <Compile Include="System.Net.Http\MessageProcessingHandler.cs" />
+ <Compile Include="System.Net.Http\MultipartContent.cs" />
+ <Compile Include="System.Net.Http\MultipartFormDataContent.cs" />
+ <Compile Include="System.Net.Http\StreamContent.cs" />
+ <Compile Include="System.Net.Http\StringContent.cs" />
</ItemGroup>
</When>
</Choose>
diff --git a/mcs/class/System.Net.Http/System.Net.Http_test.dll.sources b/mcs/class/System.Net.Http/System.Net.Http_test.dll.sources index a623a96cef4..b243d77279f 100644 --- a/mcs/class/System.Net.Http/System.Net.Http_test.dll.sources +++ b/mcs/class/System.Net.Http/System.Net.Http_test.dll.sources @@ -1,4 +1,5 @@ ../../test-helpers/NetworkHelpers.cs +HttpClientTestHelpers.cs System.Net.Http/DelegatingHandlerTest.cs System.Net.Http/ByteArrayContentTest.cs System.Net.Http/FormUrlEncodedContentTest.cs diff --git a/mcs/class/System.Net.Http/Test/HttpClientTestHelpers.cs b/mcs/class/System.Net.Http/Test/HttpClientTestHelpers.cs new file mode 100644 index 00000000000..8fb31a3ebf0 --- /dev/null +++ b/mcs/class/System.Net.Http/Test/HttpClientTestHelpers.cs @@ -0,0 +1,27 @@ +using System; +using System.Reflection; +using System.Net.Http; + +namespace MonoTests.System.Net.Http +{ + static class HttpClientTestHelpers + { +#if LEGACY_HTTPCLIENT + internal static bool UsingSocketsHandler => false; +#else + internal static bool UsingSocketsHandler => true; +#endif + + internal static bool IsSocketsHandler (HttpClientHandler handler) => UsingSocketsHandler; + + internal static HttpClient CreateHttpClient () + { + return new HttpClient (CreateHttpClientHandler ()); + } + + internal static HttpClientHandler CreateHttpClientHandler () + { + return new HttpClientHandler (); + } + } +} diff --git a/mcs/class/System.Net.Http/Test/System.Net.Http.Headers/HttpHeaderValueCollection.cs b/mcs/class/System.Net.Http/Test/System.Net.Http.Headers/HttpHeaderValueCollection.cs index 0fd75603753..2afccf21c1b 100644 --- a/mcs/class/System.Net.Http/Test/System.Net.Http.Headers/HttpHeaderValueCollection.cs +++ b/mcs/class/System.Net.Http/Test/System.Net.Http.Headers/HttpHeaderValueCollection.cs @@ -120,7 +120,10 @@ namespace MonoTests.System.Net.Http.Headers headers.TryAddWithoutValidation("User-Agent", "agent2/2.0"); Assert.AreEqual (1, headers.UserAgent.Count, "#1"); - Assert.AreEqual ("agent2/2.0user,agent/1.0", headers.UserAgent.ToString (), "#2"); + if (HttpClientTestHelpers.UsingSocketsHandler) + Assert.AreEqual ("agent2/2.0 user,agent/1.0", headers.UserAgent.ToString (), "#2"); + else + Assert.AreEqual ("agent2/2.0user,agent/1.0", headers.UserAgent.ToString (), "#2"); Assert.AreEqual ("User-Agent: agent2/2.0 user,agent/1.0\r\n", headers.ToString (), "#3"); diff --git a/mcs/class/System.Net.Http/Test/System.Net.Http.Headers/HttpHeadersTest.cs b/mcs/class/System.Net.Http/Test/System.Net.Http.Headers/HttpHeadersTest.cs index 9839d467341..bfabf4ee6a7 100644 --- a/mcs/class/System.Net.Http/Test/System.Net.Http.Headers/HttpHeadersTest.cs +++ b/mcs/class/System.Net.Http/Test/System.Net.Http.Headers/HttpHeadersTest.cs @@ -55,7 +55,15 @@ namespace MonoTests.System.Net.Http.Headers { headers.Add ("aa", "value"); headers.Add ("aa", "value"); - headers.Add ("Expires", (string) null); + + try { + headers.Add ("Expires", (string)null); + if (HttpClientTestHelpers.UsingSocketsHandler) + Assert.Fail ("#1"); + } catch (FormatException) { + if (!HttpClientTestHelpers.UsingSocketsHandler) + throw; + } } [Test] diff --git a/mcs/class/System.Net.Http/Test/System.Net.Http/HttpClientHandlerTest.cs b/mcs/class/System.Net.Http/Test/System.Net.Http/HttpClientHandlerTest.cs index 3f06e1c316d..c4e715ee793 100644 --- a/mcs/class/System.Net.Http/Test/System.Net.Http/HttpClientHandlerTest.cs +++ b/mcs/class/System.Net.Http/Test/System.Net.Http/HttpClientHandlerTest.cs @@ -66,14 +66,13 @@ namespace MonoTests.System.Net.Http #endif public void Properties_Defaults () { - var h = new HttpClientHandler (); + var h = HttpClientTestHelpers.CreateHttpClientHandler (); Assert.IsTrue (h.AllowAutoRedirect, "#1"); Assert.AreEqual (DecompressionMethods.None, h.AutomaticDecompression, "#2"); Assert.AreEqual (0, h.CookieContainer.Count, "#3"); Assert.AreEqual (4096, h.CookieContainer.MaxCookieSize, "#3b"); Assert.AreEqual (null, h.Credentials, "#4"); Assert.AreEqual (50, h.MaxAutomaticRedirections, "#5"); - Assert.AreEqual (int.MaxValue, h.MaxRequestContentBufferSize, "#6"); Assert.IsFalse (h.PreAuthenticate, "#7"); Assert.IsNull (h.Proxy, "#8"); Assert.IsTrue (h.SupportsAutomaticDecompression, "#9"); @@ -91,7 +90,7 @@ namespace MonoTests.System.Net.Http #endif public void Properties_Invalid () { - var h = new HttpClientHandler (); + var h = HttpClientTestHelpers.CreateHttpClientHandler (); try { h.MaxAutomaticRedirections = 0; Assert.Fail ("#1"); @@ -104,6 +103,9 @@ namespace MonoTests.System.Net.Http } catch (ArgumentOutOfRangeException) { } + if (HttpClientTestHelpers.UsingSocketsHandler) + Assert.Ignore (); + h.UseProxy = false; try { h.Proxy = new Proxy (); @@ -118,7 +120,7 @@ namespace MonoTests.System.Net.Http #endif public void Properties_AfterClientCreation () { - var h = new HttpClientHandler (); + var h = HttpClientTestHelpers.CreateHttpClientHandler (); h.AllowAutoRedirect = true; // We may modify properties after creating the HttpClient. @@ -133,7 +135,7 @@ namespace MonoTests.System.Net.Http #endif public void Disposed () { - var h = new HttpClientHandler (); + var h = HttpClientTestHelpers.CreateHttpClientHandler (); h.Dispose (); var c = new HttpClient (h); try { @@ -141,6 +143,9 @@ namespace MonoTests.System.Net.Http Assert.Fail ("#1"); } catch (AggregateException e) { Assert.IsTrue (e.InnerException is ObjectDisposedException, "#2"); + Assert.IsFalse (HttpClientTestHelpers.IsSocketsHandler (h), "#3"); + } catch (ObjectDisposedException) { + Assert.IsTrue (HttpClientTestHelpers.IsSocketsHandler (h), "#4"); } } } diff --git a/mcs/class/System.Net.Http/Test/System.Net.Http/HttpClientTest.cs b/mcs/class/System.Net.Http/Test/System.Net.Http/HttpClientTest.cs index 63cddcda8f6..6c46078f986 100644 --- a/mcs/class/System.Net.Http/Test/System.Net.Http/HttpClientTest.cs +++ b/mcs/class/System.Net.Http/Test/System.Net.Http/HttpClientTest.cs @@ -180,7 +180,7 @@ namespace MonoTests.System.Net.Http [Test] public void Ctor_Default () { - var client = new HttpClient (); + var client = HttpClientTestHelpers.CreateHttpClient (); Assert.IsNull (client.BaseAddress, "#1"); Assert.IsNotNull (client.DefaultRequestHeaders, "#2"); // TODO: full check Assert.AreEqual (int.MaxValue, client.MaxResponseContentBufferSize, "#3"); @@ -255,11 +255,10 @@ namespace MonoTests.System.Net.Http #endif public void CancelRequestViaProxy () { - var handler = new HttpClientHandler { - Proxy = new WebProxy ("192.168.10.25:8888/"), // proxy that doesn't exist - UseProxy = true, - AutomaticDecompression = DecompressionMethods.GZip | DecompressionMethods.Deflate - }; + var handler = HttpClientTestHelpers.CreateHttpClientHandler (); + handler.Proxy = new WebProxy ("192.168.10.25:8888/"); // proxy that doesn't exist + handler.UseProxy = true; + handler.AutomaticDecompression = DecompressionMethods.GZip | DecompressionMethods.Deflate; var httpClient = new HttpClient (handler) { BaseAddress = new Uri ("https://google.com"), @@ -283,7 +282,7 @@ namespace MonoTests.System.Net.Http [Test] public void Properties () { - var client = new HttpClient (); + var client = HttpClientTestHelpers.CreateHttpClient (); client.BaseAddress = null; client.MaxResponseContentBufferSize = int.MaxValue; client.Timeout = Timeout.InfiniteTimeSpan; @@ -296,7 +295,7 @@ namespace MonoTests.System.Net.Http [Test] public void Properties_Invalid () { - var client = new HttpClient (); + var client = HttpClientTestHelpers.CreateHttpClient (); try { client.MaxResponseContentBufferSize = 0; Assert.Fail ("#1"); @@ -333,9 +332,8 @@ namespace MonoTests.System.Net.Http try { WebRequest.DefaultWebProxy = new ThrowOnlyProxy (); - var request = new HttpClientHandler { - UseProxy = false - }; + var request = HttpClientTestHelpers.CreateHttpClientHandler (); + request.UseProxy = false; var client = new HttpClient (request); Assert.IsTrue (client.GetAsync ("http://google.com").Wait (5000), "needs internet access"); @@ -364,6 +362,7 @@ namespace MonoTests.System.Net.Http } [Test] + [Category ("NotWorking")] public void Send_BaseAddress () { var mh = new HttpMessageHandlerMock (); @@ -437,7 +436,7 @@ namespace MonoTests.System.Net.Http }, port); try { - var client = new HttpClient (); + var client = HttpClientTestHelpers.CreateHttpClient (); var request = new HttpRequestMessage (HttpMethod.Get, $"http://localhost:{port}/"); var response = client.SendAsync (request, HttpCompletionOption.ResponseHeadersRead).Result; @@ -487,7 +486,7 @@ namespace MonoTests.System.Net.Http }, port); try { - var client = new HttpClient (); + var client = HttpClientTestHelpers.CreateHttpClient (); var request = new HttpRequestMessage (HttpMethod.Get, $"http://localhost:{port}/"); request.Version = HttpVersion.Version10; var response = client.SendAsync (request, HttpCompletionOption.ResponseHeadersRead).Result; @@ -541,7 +540,7 @@ namespace MonoTests.System.Net.Http }, port); try { - var chandler = new HttpClientHandler (); + var chandler = HttpClientTestHelpers.CreateHttpClientHandler (); chandler.AllowAutoRedirect = true; chandler.AutomaticDecompression = DecompressionMethods.GZip; chandler.MaxAutomaticRedirections = 33; @@ -600,7 +599,8 @@ namespace MonoTests.System.Net.Http }, port); try { - var client = new HttpClient (); + var handler = HttpClientTestHelpers.CreateHttpClientHandler (); + var client = new HttpClient (handler); var request = new HttpRequestMessage (HttpMethod.Get, $"http://localhost:{port}/"); Assert.IsTrue (request.Headers.TryAddWithoutValidation ("aa", "vv"), "#0"); var response = client.SendAsync (request, HttpCompletionOption.ResponseHeadersRead).Result; @@ -628,7 +628,10 @@ namespace MonoTests.System.Net.Http Assert.AreEqual ("w3.org", response.Headers.Location.OriginalString, "#107"); Assert.AreEqual ("test description", response.ReasonPhrase, "#110"); - Assert.AreEqual (HttpVersion.Version11, response.Version, "#111"); + if (HttpClientTestHelpers.IsSocketsHandler (handler)) + Assert.AreEqual (HttpVersion.Version10, response.Version, "#111"); + else + Assert.AreEqual (HttpVersion.Version11, response.Version, "#111"); Assert.AreEqual (false, failed, "#112"); } finally { @@ -657,7 +660,7 @@ namespace MonoTests.System.Net.Http }, port); try { - var client = new HttpClient (); + var client = HttpClientTestHelpers.CreateHttpClient (); client.DefaultRequestHeaders.Add("User-Agent", "MLK Android Phone 1.1.9"); @@ -693,7 +696,7 @@ namespace MonoTests.System.Net.Http }, port); try { - var client = new HttpClient (); + var client = HttpClientTestHelpers.CreateHttpClient (); client.DefaultRequestHeaders.Add("Host", "customhost"); @@ -714,8 +717,44 @@ namespace MonoTests.System.Net.Http #if FEATURE_NO_BSD_SOCKETS [ExpectedException (typeof (PlatformNotSupportedException))] #endif + public void Send_Transfer_Encoding_Chunked_Needs_Content () + { + if (!HttpClientTestHelpers.UsingSocketsHandler) + Assert.Ignore ("Requires SocketsHttpHandler"); + + bool? failed = null; + + var port = NetworkHelpers.FindFreePort (); + var listener = CreateListener (l => { + failed = true; + }, port); + + try { + try { + var client = HttpClientTestHelpers.CreateHttpClient (); + client.DefaultRequestHeaders.TransferEncodingChunked = true; + client.GetAsync ($"http://localhost:{port}/").Wait (); + // fails with + // 'Transfer-Encoding: chunked' header can not be used when content object is not specified. + } catch (AggregateException e) { + Assert.AreEqual (typeof (HttpRequestException), e.InnerException.GetType (), "#2"); + } + Assert.IsNull (failed, "#102"); + } finally { + listener.Abort (); + listener.Close (); + } + } + + [Test] +#if FEATURE_NO_BSD_SOCKETS + [ExpectedException (typeof (PlatformNotSupportedException))] +#endif public void Send_Transfer_Encoding_Chunked () { + if (HttpClientTestHelpers.UsingSocketsHandler) + Assert.Ignore ("Requires LegacyHttpClient"); + bool? failed = null; var port = NetworkHelpers.FindFreePort (); @@ -734,7 +773,7 @@ namespace MonoTests.System.Net.Http }, port); try { - var client = new HttpClient (); + var client = HttpClientTestHelpers.CreateHttpClient (); client.DefaultRequestHeaders.TransferEncodingChunked = true; client.GetAsync ($"http://localhost:{port}/").Wait (); @@ -750,8 +789,12 @@ namespace MonoTests.System.Net.Http #if FEATURE_NO_BSD_SOCKETS [ExpectedException (typeof (PlatformNotSupportedException))] #endif + // The SocketsHttpHandler permits custom transfer encodings. public void Send_Transfer_Encoding_Custom () { + if (HttpClientTestHelpers.UsingSocketsHandler) + Assert.Ignore ("Requires LegacyHttpClient"); + bool? failed = null; var port = NetworkHelpers.FindFreePort (); @@ -760,7 +803,7 @@ namespace MonoTests.System.Net.Http }, port); try { - var client = new HttpClient (); + var client = HttpClientTestHelpers.CreateHttpClient (); client.DefaultRequestHeaders.TransferEncoding.Add (new TransferCodingHeaderValue ("chunked2")); var request = new HttpRequestMessage (HttpMethod.Get, $"http://localhost:{port}/"); @@ -792,7 +835,7 @@ namespace MonoTests.System.Net.Http }, port); try { - var client = new HttpClient (); + var client = HttpClientTestHelpers.CreateHttpClient (); var request = new HttpRequestMessage (HttpMethod.Get, $"http://localhost:{port}/"); Assert.IsTrue (request.Headers.TryAddWithoutValidation ("aa", "vv"), "#0"); var response = client.SendAsync (request, HttpCompletionOption.ResponseHeadersRead).Result; @@ -823,7 +866,7 @@ namespace MonoTests.System.Net.Http }, port); try { - var client = new HttpClient (); + var client = HttpClientTestHelpers.CreateHttpClient (); client.MaxResponseContentBufferSize = 1000; var request = new HttpRequestMessage (HttpMethod.Get, $"http://localhost:{port}/"); var response = client.SendAsync (request, HttpCompletionOption.ResponseHeadersRead).Result; @@ -849,7 +892,7 @@ namespace MonoTests.System.Net.Http }, port); try { - var client = new HttpClient (); + var client = HttpClientTestHelpers.CreateHttpClient (); client.MaxResponseContentBufferSize = 1000; var request = new HttpRequestMessage (HttpMethod.Get, $"http://localhost:{port}/"); @@ -895,14 +938,20 @@ namespace MonoTests.System.Net.Http void Send_Complete_NoContent (HttpMethod method) { bool? failed = null; + var handler = HttpClientTestHelpers.CreateHttpClientHandler (); var port = NetworkHelpers.FindFreePort (); var listener = CreateListener (l => { try { var request = l.Request; - Assert.AreEqual (3, request.Headers.Count, "#1"); + if (HttpClientTestHelpers.IsSocketsHandler (handler)) { + Assert.AreEqual (2, request.Headers.Count, "#1"); + Assert.IsNull (request.Headers["Connection"], "#1c"); + } else { + Assert.AreEqual (3, request.Headers.Count, "#1"); + Assert.AreEqual ("keep-alive", request.Headers["Connection"], "#1c"); + } Assert.AreEqual ("0", request.Headers ["Content-Length"], "#1b"); - Assert.AreEqual ("keep-alive", request.Headers ["Connection"], "#1c"); Assert.AreEqual (method.Method, request.HttpMethod, "#2"); failed = false; } catch (Exception ex){ @@ -914,7 +963,7 @@ namespace MonoTests.System.Net.Http }, port); try { - var client = new HttpClient (); + var client = new HttpClient (handler); var request = new HttpRequestMessage (method, $"http://localhost:{port}/"); var response = client.SendAsync (request, HttpCompletionOption.ResponseHeadersRead).Result; @@ -939,7 +988,7 @@ namespace MonoTests.System.Net.Http }, port); try { - var client = new HttpClient (); + var client = HttpClientTestHelpers.CreateHttpClient (); var request = new HttpRequestMessage (HttpMethod.Get, $"http://localhost:{port}/"); var response = client.SendAsync (request, HttpCompletionOption.ResponseHeadersRead).Result; @@ -963,7 +1012,7 @@ namespace MonoTests.System.Net.Http }, port); try { - var client = new HttpClient (); + var client = HttpClientTestHelpers.CreateHttpClient (); var r = new HttpRequestMessage (HttpMethod.Get, $"http://localhost:{port}/"); var response = client.SendAsync (r).Result; @@ -991,7 +1040,7 @@ namespace MonoTests.System.Net.Http }, port); try { - var client = new HttpClient (); + var client = HttpClientTestHelpers.CreateHttpClient (); var r = new HttpRequestMessage (HttpMethod.Get, $"http://localhost:{port}/"); var response = client.SendAsync (r).Result; @@ -1017,7 +1066,7 @@ namespace MonoTests.System.Net.Http }, port); try { - var client = new HttpClient (); + var client = HttpClientTestHelpers.CreateHttpClient (); var r = new HttpRequestMessage (HttpMethod.Put, $"http://localhost:{port}/"); r.Content = new StringContent ("my text"); var response = client.SendAsync (r).Result; @@ -1037,15 +1086,19 @@ namespace MonoTests.System.Net.Http public void Send_Content_Put_CustomStream () { bool passed = false; + var handler = HttpClientTestHelpers.CreateHttpClientHandler (); var port = NetworkHelpers.FindFreePort (); var listener = CreateListener (l => { var request = l.Request; - passed = 44 == request.ContentLength64; + if (HttpClientTestHelpers.IsSocketsHandler (handler)) + passed = -1 == request.ContentLength64; + else + passed = 44 == request.ContentLength64; passed &= request.ContentType == null; }, port); try { - var client = new HttpClient (); + var client = new HttpClient (handler); var r = new HttpRequestMessage (HttpMethod.Put, $"http://localhost:{port}/"); r.Content = new StreamContent (new CustomStream ()); var response = client.SendAsync (r).Result; @@ -1080,7 +1133,7 @@ namespace MonoTests.System.Net.Http [Test] public void Send_Invalid () { - var client = new HttpClient (); + var client = HttpClientTestHelpers.CreateHttpClient (); try { client.SendAsync (null).Wait (WaitTimeout); Assert.Fail ("#1"); @@ -1174,7 +1227,7 @@ namespace MonoTests.System.Net.Http }, port); try { - var client = new HttpClient (); + var client = HttpClientTestHelpers.CreateHttpClient (); client.DefaultRequestHeaders.TransferEncodingChunked = true; @@ -1228,7 +1281,7 @@ namespace MonoTests.System.Net.Http }, port); try { - var client = new HttpClient (); + var client = HttpClientTestHelpers.CreateHttpClient (); var imageContent = new StreamContent (new MemoryStream ()); @@ -1263,7 +1316,7 @@ namespace MonoTests.System.Net.Http AddListenerContext (listener, context); // add another request handler for the second request try { - var client = new HttpClient (); + var client = HttpClientTestHelpers.CreateHttpClient (); var t1 = client.GetStringAsync ($"http://localhost:{port}/"); var t2 = client.GetStringAsync ($"http://localhost:{port}/"); Assert.IsTrue (Task.WaitAll (new [] { t1, t2 }, WaitTimeout)); @@ -1289,7 +1342,7 @@ namespace MonoTests.System.Net.Http }, port); try { - var client = new HttpClient (); + var client = HttpClientTestHelpers.CreateHttpClient (); try { client.GetByteArrayAsync ($"http://localhost:{port}/").Wait (WaitTimeout); Assert.Fail ("#1"); @@ -1317,7 +1370,7 @@ namespace MonoTests.System.Net.Http }, port); try { - var chandler = new HttpClientHandler (); + var chandler = HttpClientTestHelpers.CreateHttpClientHandler (); chandler.AllowAutoRedirect = false; var client = new HttpClient (chandler); @@ -1362,7 +1415,7 @@ namespace MonoTests.System.Net.Http }, redirectPort); try { - var chandler = new HttpClientHandler (); + var chandler = HttpClientTestHelpers.CreateHttpClientHandler (); chandler.AllowAutoRedirect = true; var client = new HttpClient (chandler); @@ -1388,7 +1441,7 @@ namespace MonoTests.System.Net.Http */ public void ModifyHandlerAfterFirstRequest () { - var chandler = new HttpClientHandler (); + var chandler = HttpClientTestHelpers.CreateHttpClientHandler (); chandler.AllowAutoRedirect = true; var client = new HttpClient (chandler, true); @@ -1444,8 +1497,11 @@ namespace MonoTests.System.Net.Http // https://github.com/mono/mono/issues/7355 public void WildcardConnect () { + if (HttpClientTestHelpers.UsingSocketsHandler) + Assert.Ignore ("Throws System.NullReferenceException"); + try { - using (var client = new HttpClient ()) { + using (var client = HttpClientTestHelpers.CreateHttpClient ()) { client.GetAsync ("http://255.255.255.255").Wait (WaitTimeout); } } catch (AggregateException e) { diff --git a/mcs/class/System.Net.Http/Test/System.Net.Http/HttpRequestMessageTest.cs b/mcs/class/System.Net.Http/Test/System.Net.Http/HttpRequestMessageTest.cs index 178d1d93860..e0cbfd2c823 100644 --- a/mcs/class/System.Net.Http/Test/System.Net.Http/HttpRequestMessageTest.cs +++ b/mcs/class/System.Net.Http/Test/System.Net.Http/HttpRequestMessageTest.cs @@ -61,9 +61,13 @@ namespace MonoTests.System.Net.Http Assert.AreEqual (HttpMethod.Get, m.Method, "#3"); Assert.IsNotNull (m.Properties, "#4"); Assert.IsNull (m.RequestUri, "#5"); - Assert.AreEqual (new Version (1, 1), m.Version, "#6"); - - Assert.AreEqual ("Method: GET, RequestUri: '<null>', Version: 1.1, Content: <null>, Headers:\r\n{\r\n}", m.ToString (), "#7"); + if (HttpClientTestHelpers.UsingSocketsHandler) { + Assert.AreEqual (new Version (2, 0), m.Version, "#6"); + Assert.AreEqual ("Method: GET, RequestUri: '<null>', Version: 2.0, Content: <null>, Headers:\r\n{\r\n}", m.ToString (), "#7"); + } else { + Assert.AreEqual (new Version (1, 1), m.Version, "#6"); + Assert.AreEqual ("Method: GET, RequestUri: '<null>', Version: 1.1, Content: <null>, Headers:\r\n{\r\n}", m.ToString (), "#7"); + } } [Test] @@ -91,7 +95,7 @@ namespace MonoTests.System.Net.Http [Test] public void Ctor_RelativeUri () { - var client = new HttpClient (); + var client = HttpClientTestHelpers.CreateHttpClient (); client.BaseAddress = new Uri ("http://en.wikipedia.org/wiki/"); var uri = new Uri ("Computer", UriKind.Relative); var req = new HttpRequestMessage (HttpMethod.Get, uri); @@ -116,7 +120,7 @@ namespace MonoTests.System.Net.Http [Test] public void Ctor_RelativeUriString () { - var client = new HttpClient (); + var client = HttpClientTestHelpers.CreateHttpClient (); client.BaseAddress = new Uri ("http://en.wikipedia.org/wiki/"); var req = new HttpRequestMessage (HttpMethod.Get, "Computer"); // HttpRequestMessage does not rewrite it here. @@ -666,7 +670,10 @@ namespace MonoTests.System.Net.Http // .NET encloses the "Age: vv" with two whitespaces. var normalized = Regex.Replace (message.ToString (), @"\s", ""); - Assert.AreEqual ("Method:GET,RequestUri:'<null>',Version:1.1,Content:<null>,Headers:{Age:vv}", normalized, "#3"); + if (HttpClientTestHelpers.UsingSocketsHandler) + Assert.AreEqual ("Method:GET,RequestUri:'<null>',Version:2.0,Content:<null>,Headers:{Age:vv}", normalized, "#3"); + else + Assert.AreEqual ("Method:GET,RequestUri:'<null>',Version:1.1,Content:<null>,Headers:{Age:vv}", normalized, "#3"); } [Test] diff --git a/mcs/class/System.Net.Http/Test/System.Net.Http/HttpResponseMessageTest.cs b/mcs/class/System.Net.Http/Test/System.Net.Http/HttpResponseMessageTest.cs index b13e8cae417..64c87bfbd2f 100644 --- a/mcs/class/System.Net.Http/Test/System.Net.Http/HttpResponseMessageTest.cs +++ b/mcs/class/System.Net.Http/Test/System.Net.Http/HttpResponseMessageTest.cs @@ -275,7 +275,10 @@ namespace MonoTests.System.Net.Http Assert.AreEqual ("v1", values[0]); break; case 1: - Assert.AreEqual ("cache-control", entry.Key); + if (HttpClientTestHelpers.UsingSocketsHandler) + Assert.AreEqual ("Cache-Control", entry.Key); + else + Assert.AreEqual ("cache-control", entry.Key); values = entry.Value.ToList (); Assert.AreEqual (1, values.Count); Assert.AreEqual ("audio", values[0]); diff --git a/mcs/class/System.Net.Http/TestData/testservereku.contoso.com.pfx b/mcs/class/System.Net.Http/TestData/testservereku.contoso.com.pfx Binary files differnew file mode 100644 index 00000000000..1d59670a017 --- /dev/null +++ b/mcs/class/System.Net.Http/TestData/testservereku.contoso.com.pfx diff --git a/mcs/class/System.Net.Http/UnitTests/Makefile b/mcs/class/System.Net.Http/UnitTests/Makefile new file mode 100644 index 00000000000..36d9e14d75f --- /dev/null +++ b/mcs/class/System.Net.Http/UnitTests/Makefile @@ -0,0 +1,17 @@ +thisdir = class/System.Net.Http/UnitTests +SUBDIRS = +include ../../../build/rules.make + +ASSEMBLY = System.Net.Http.UnitTests + +XTEST_LIB_REFS = System System.Core Facades/System.Threading.Tasks +USE_XTEST_REMOTE_EXECUTOR = YES +XTEST_MCS_FLAGS = -nowarn:436 + +include ../../../build/tests.make + +xtest_flags = $(xunit_libs_ref) $(XTEST_MCS_FLAGS) $(XTEST_LIB_MCS_FLAGS) /unsafe + +clean-local: + -rm -f $(tests_CLEAN_FILES) $(CLEAN_FILES) + diff --git a/mcs/class/System.Net.Http/UnitTests/System.Net.Http.UnitTests_xtest.dll.sources b/mcs/class/System.Net.Http/UnitTests/System.Net.Http.UnitTests_xtest.dll.sources new file mode 100644 index 00000000000..ea8b52eca73 --- /dev/null +++ b/mcs/class/System.Net.Http/UnitTests/System.Net.Http.UnitTests_xtest.dll.sources @@ -0,0 +1 @@ +#include unit-tests.sources diff --git a/mcs/class/System.Net.Http/UnitTests/legacy-test.sources b/mcs/class/System.Net.Http/UnitTests/legacy-test.sources new file mode 100644 index 00000000000..e69de29bb2d --- /dev/null +++ b/mcs/class/System.Net.Http/UnitTests/legacy-test.sources diff --git a/mcs/class/System.Net.Http/UnitTests/linux_net_4_x_System.Net.Http.UnitTests_xtest.dll.sources b/mcs/class/System.Net.Http/UnitTests/linux_net_4_x_System.Net.Http.UnitTests_xtest.dll.sources new file mode 100644 index 00000000000..ea8b52eca73 --- /dev/null +++ b/mcs/class/System.Net.Http/UnitTests/linux_net_4_x_System.Net.Http.UnitTests_xtest.dll.sources @@ -0,0 +1 @@ +#include unit-tests.sources diff --git a/mcs/class/System.Net.Http/UnitTests/macos_net_4_x_System.Net.Http.UnitTests_xtest.dll.sources b/mcs/class/System.Net.Http/UnitTests/macos_net_4_x_System.Net.Http.UnitTests_xtest.dll.sources new file mode 100644 index 00000000000..ea8b52eca73 --- /dev/null +++ b/mcs/class/System.Net.Http/UnitTests/macos_net_4_x_System.Net.Http.UnitTests_xtest.dll.sources @@ -0,0 +1 @@ +#include unit-tests.sources diff --git a/mcs/class/System.Net.Http/UnitTests/unit-tests.sources b/mcs/class/System.Net.Http/UnitTests/unit-tests.sources new file mode 100644 index 00000000000..83f397b021e --- /dev/null +++ b/mcs/class/System.Net.Http/UnitTests/unit-tests.sources @@ -0,0 +1,73 @@ +../../corlib/corefx/SR.cs +../../corlib/ReferenceSources/SR.cs +../../../build/common/SR.cs + +# Common Sources + +../../../../external/corefx/src/Common/src/System/NotImplemented.cs +../../../../external/corefx/src/Common/src/System/CharArrayHelpers.cs +../../../../external/corefx/src/Common/src/System/StringExtensions.cs +../../../../external/corefx/src/Common/src/CoreLib/System/Text/StringBuilderCache.cs +../../../../external/corefx/src/Common/src/System/IO/DelegatingStream.cs +../../../../external/corefx/src/Common/src/System/IO/ReadOnlyMemoryStream.cs +../../../../external/corefx/src/Common/src/System/IO/StreamHelpers.CopyValidation.cs +../../../../external/corefx/src/Common/src/System/Net/HttpKnownHeaderNames.cs +../../../../external/corefx/src/Common/src/System/Net/HttpKnownHeaderNames.TryGetHeaderName.cs +../../../../external/corefx/src/Common/src/System/Net/HttpStatusDescription.cs +../../../../external/corefx/src/Common/src/System/Net/Logging/NetEventSource.Common.cs +../../../../external/corefx/src/Common/src/System/Net/SecurityProtocol.cs +../../../../external/corefx/src/Common/src/System/Net/UriScheme.cs +../../../../external/corefx/src/Common/src/System/Net/Mail/MailAddress.cs +../../../../external/corefx/src/Common/src/System/Net/Mail/DomainLiteralReader.cs +../../../../external/corefx/src/Common/src/System/Net/Mail/DotAtomReader.cs +../../../../external/corefx/src/Common/src/System/Net/Mail/MailAddressParser.cs +../../../../external/corefx/src/Common/src/System/Net/Mail/MailBnfHelper.cs +../../../../external/corefx/src/Common/src/System/Net/Mail/QuotedPairReader.cs +../../../../external/corefx/src/Common/src/System/Net/Mail/QuotedStringFormatReader.cs +../../../../external/corefx/src/Common/src/System/Net/Mail/WhitespaceReader.cs +../../../../external/corefx/src/Common/src/System/Threading/Tasks/TaskToApm.cs + +../../../../external/corefx/src/Common/src/System/Net/Http/HttpHandlerDefaults.cs + +# Test Utilities + +../../../../external/corefx/src/CoreFx.Private.TestUtilities/src/System/AssertExtensions.cs +../../../../external/corefx/src/CoreFx.Private.TestUtilities/src/System/TestEnvironment.cs +../../../../external/corefx/src/CoreFx.Private.TestUtilities/src/System/TheoryExtensions.cs + +# Common Test Sources + +../../../../external/corefx/src/Common/tests/System/ShouldNotBeInvokedException.cs +../../../../external/corefx/src/Common/tests/System/Buffers/NativeMemoryManager.cs +../../../../external/corefx/src/Common/tests/System/Diagnostics/Tracing/TestEventListener.cs +../../../../external/corefx/src/Common/tests/System/Diagnostics/Tracing/ConsoleEventListener.cs +../../../../external/corefx/src/Common/tests/System/IO/DelegateStream.cs +../../../../external/corefx/src/Common/tests/System/Net/RemoteServerQuery.cs +../../../../external/corefx/src/Common/tests/System/Net/Configuration.Certificates.cs +../../../../external/corefx/src/Common/tests/System/Net/EventSourceTestLogging.cs +../../../../external/corefx/src/Common/tests/System/Net/HttpsTestServer.cs +../../../../external/corefx/src/Common/tests/System/Net/Capability.Security.cs +../../../../external/corefx/src/Common/tests/System/Net/Configuration.cs +../../../../external/corefx/src/Common/tests/System/Net/Configuration.Http.cs +../../../../external/corefx/src/Common/tests/System/Net/Configuration.Security.cs +../../../../external/corefx/src/Common/tests/System/Net/TestWebProxies.cs +../../../../external/corefx/src/Common/tests/System/Net/VerboseTestLogging.cs +../../../../external/corefx/src/Common/tests/System/Net/Http/LoopbackServer.cs +../../../../external/corefx/src/Common/tests/System/Net/Http/LoopbackServer.AuthenticationHelpers.cs +../../../../external/corefx/src/Common/tests/System/Threading/Tasks/TaskTimeoutExtensions.cs + +# System.Net.Http Source Files + +../../../../external/corefx/src/System.Net.Http/src/System/Net/Http/Headers/*.cs +../../../../external/corefx/src/System.Net.Http/src/System/Net/Http/*.cs:HttpClientHandler*.cs,DiagnosticsHandler.cs + +../../../../external/corefx/src/System.Net.Http/src/System/Net/Http/CurlHandler/CurlResponseHeaderReader.cs +../../../../external/corefx/src/System.Net.Http/src/System/Net/Http/SocketsHttpHandler/AuthenticationHelper.Digest.cs +../../../../external/corefx/src/System.Net.Http/src/System/Net/Http/SocketsHttpHandler/HttpEnvironmentProxy.cs + +# UnitTests + +../../../../external/corefx/src/System.Net.Http/tests/UnitTests/Fakes/HttpClientHandler.cs +../../../../external/corefx/src/System.Net.Http/tests/UnitTests/Headers/*.cs +../../../../external/corefx/src/System.Net.Http/tests/UnitTests/Headers/GenericHeaderParserTest/*.cs +../../../../external/corefx/src/System.Net.Http/tests/UnitTests/*.cs:HttpSystemProxyTest.cs diff --git a/mcs/class/System.Net.Http/build_System.Net.Http.dll.sources b/mcs/class/System.Net.Http/build_System.Net.Http.dll.sources new file mode 100644 index 00000000000..704cd9f69ab --- /dev/null +++ b/mcs/class/System.Net.Http/build_System.Net.Http.dll.sources @@ -0,0 +1 @@ +#include legacy.sources diff --git a/mcs/class/System.Net.Http/corefx/Configuration.Certificates.cs b/mcs/class/System.Net.Http/corefx/Configuration.Certificates.cs new file mode 100644 index 00000000000..5ea14b2ef51 --- /dev/null +++ b/mcs/class/System.Net.Http/corefx/Configuration.Certificates.cs @@ -0,0 +1,117 @@ +// Licensed to the .NET Foundation under one or more agreements. +// The .NET Foundation licenses this file to you under the MIT license. +// See the LICENSE file in the project root for more information. + +using System.Diagnostics; +using System.IO; +using System.Runtime.InteropServices; +using System.Security.Authentication; +using System.Security.Cryptography.X509Certificates; +using System.Threading; +using Xunit; + +namespace System.Net.Test.Common +{ + public static partial class Configuration + { + public static partial class Certificates + { + private const string CertificatePassword = "testcertificate"; + private const string TestDataFolder = "TestData"; + + private static readonly Mutex m; + private const int MutexTimeout = 120 * 1000; + + static Certificates() + { + if (PlatformDetection.IsUap) + { + // UWP doesn't support Global mutexes. + m = new Mutex(false, "Local\\CoreFXTest.Configuration.Certificates.LoadPfxCertificate"); + } + else + { + m = new Mutex(false, "Global\\CoreFXTest.Configuration.Certificates.LoadPfxCertificate"); + } + } + + public static X509Certificate2 GetServerCertificate() => GetCertWithPrivateKey(GetServerCertificateCollection()); + + public static X509Certificate2 GetClientCertificate() => GetCertWithPrivateKey(GetClientCertificateCollection()); + + public static X509Certificate2 GetNoEKUCertificate() => GetCertWithPrivateKey(GetNoEKUCertificateCollection()); + + public static X509Certificate2 GetSelfSignedServerCertificate() => GetCertWithPrivateKey(GetSelfSignedServerCertificateCollection()); + + public static X509Certificate2 GetSelfSignedClientCertificate() => GetCertWithPrivateKey(GetSelfSignedClientCertificateCollection()); + + public static X509Certificate2Collection GetServerCertificateCollection() => GetCertificateCollection("testservereku.contoso.com.pfx"); + + public static X509Certificate2Collection GetClientCertificateCollection() => GetCertificateCollection("testclienteku.contoso.com.pfx"); + + public static X509Certificate2Collection GetNoEKUCertificateCollection() => GetCertificateCollection("testnoeku.contoso.com.pfx"); + + public static X509Certificate2Collection GetSelfSignedServerCertificateCollection() => GetCertificateCollection("testselfsignedservereku.contoso.com.pfx"); + + public static X509Certificate2Collection GetSelfSignedClientCertificateCollection() => GetCertificateCollection("testselfsignedclienteku.contoso.com.pfx"); + + private static byte[] GetResourceData(string name) + { + var assembly = typeof(Configuration).Assembly; + using (var stream = assembly.GetManifestResourceStream(name)) + using (var reader = new BinaryReader(stream)) + { + var data = new byte[stream.Length]; + var ret = stream.Read(data, 0, data.Length); + if (ret != data.Length) + throw new IOException(); + return data; + } + } + + private static X509Certificate2Collection GetCertificateCollection(string certificateFileName) + { + // On Windows, .NET Core applications should not import PFX files in parallel to avoid a known system-level race condition. + // This bug results in corrupting the X509Certificate2 certificate state. + Assert.True(m.WaitOne(MutexTimeout), "Cannot acquire the global certificate mutex."); + try + { + var certData = GetResourceData(certificateFileName); + var certCollection = new X509Certificate2Collection(); + certCollection.Import(certData, CertificatePassword, X509KeyStorageFlags.DefaultKeySet); + + return certCollection; + } + catch (Exception ex) + { + Debug.Fail(nameof(Configuration.Certificates.GetCertificateCollection) + " threw " + ex.ToString()); + throw; + } + finally + { + m.ReleaseMutex(); + } + } + + private static X509Certificate2 GetCertWithPrivateKey(X509Certificate2Collection certCollection) + { + X509Certificate2 certificate = null; + + foreach (X509Certificate2 c in certCollection) + { + if (certificate == null && c.HasPrivateKey) + { + certificate = c; + } + else + { + c.Dispose(); + } + } + + Assert.NotNull(certificate); + return certificate; + } + } + } +} diff --git a/mcs/class/System.Net.Http/corefx/Configuration.Http.cs b/mcs/class/System.Net.Http/corefx/Configuration.Http.cs new file mode 100644 index 00000000000..d98cdde1ebf --- /dev/null +++ b/mcs/class/System.Net.Http/corefx/Configuration.Http.cs @@ -0,0 +1,14 @@ +namespace System.Net.Test.Common +{ + public static partial class Configuration + { + public static partial class Http + { + public static readonly object[][] EchoServers = { new object[] { RemoteEchoServer }, new object[] { SecureRemoteEchoServer } }; + public static readonly object[][] VerifyUploadServers = { new object[] { RemoteVerifyUploadServer }, new object[] { SecureRemoteVerifyUploadServer } }; + public static readonly object[][] CompressedServers = { new object[] { RemoteDeflateServer }, new object[] { RemoteGZipServer } }; + public static readonly object[][] Http2Servers = { new object[] { new Uri ("https://" + Http2Host) } }; + public static readonly object[][] Http2NoPushServers = { new object[] { new Uri ("https://" + Http2NoPushHost) } }; + } + } +} diff --git a/mcs/class/System.Net.Http/corefx/Interop.VersionInfo.cs b/mcs/class/System.Net.Http/corefx/Interop.VersionInfo.cs new file mode 100644 index 00000000000..2a0a3e2086c --- /dev/null +++ b/mcs/class/System.Net.Http/corefx/Interop.VersionInfo.cs @@ -0,0 +1,17 @@ +using System; + +internal static partial class Interop +{ + internal static partial class Http + { + internal static bool GetSupportsHttp2Multiplexing () => false; + + internal static string GetVersionDescription () => throw new PlatformNotSupportedException (); + + internal static string GetSslVersionDescription () => throw new PlatformNotSupportedException (); + + internal const string OpenSsl10Description = "openssl/1.0"; + internal const string SecureTransportDescription = "SecureTransport"; + internal const string LibreSslDescription = "LibreSSL"; + } +} diff --git a/mcs/class/System.Net.Http/corefx/NetEventSource.Http.cs b/mcs/class/System.Net.Http/corefx/NetEventSource.Http.cs new file mode 100644 index 00000000000..d909da45053 --- /dev/null +++ b/mcs/class/System.Net.Http/corefx/NetEventSource.Http.cs @@ -0,0 +1,57 @@ +using System.Diagnostics.Tracing; +using System.Net.Http; + +namespace System.Net +{ + internal sealed partial class NetEventSource : EventSource + { + public static NetEventSource Log => throw new PlatformNotSupportedException (); + + public static new bool IsEnabled => false; + + public static void Associate (params object[] args) + { + } + + [NonEvent] + public static void Error (params object[] args) + { + } + + public static void Enter (params object[] args) + { + + } + + public static void Exit (params object[] args) + { + } + + public static void Info (params object[] args) + { + } + + [NonEvent] + public static void UriBaseAddress (object obj, Uri baseAddress) + { + } + + [NonEvent] + public static void ContentNull (object obj) + { + } + + [NonEvent] + public static void ClientSendCompleted (HttpClient httpClient, HttpResponseMessage response, HttpRequestMessage request) + { + } + + public void HeadersInvalidValue (string name, string rawValue) + { + } + + public void HandlerMessage (int handlerId, int workerId, int requestId, string memberName, string message) + { + } + } +} diff --git a/mcs/class/System.Net.Http/corefx/PlatformDetection.cs b/mcs/class/System.Net.Http/corefx/PlatformDetection.cs new file mode 100644 index 00000000000..e79df47b8cb --- /dev/null +++ b/mcs/class/System.Net.Http/corefx/PlatformDetection.cs @@ -0,0 +1,21 @@ +namespace System +{ + static partial class PlatformDetection + { + public static bool IsOSX => true; + public static bool IsDebian => false; + public static int WindowsVersion => -1; + + /* + * Use of these properties should be strictly limited to the `System.Net.Http` tests. + * + * Please do not move them into the shared PlatformDetection part or use them outside + * this directory without previously talking to me (Martin Baulig (mabaul@microsoft.com)) + * as I plan to eventually remove / replace them with a more robust mechanism. + */ + public static Version OpenSslVersion => new Version (-1, 0); + public static bool SupportsX509Chain => UsingBtls; + public static bool SupportsCertRevocation => !UsingBtls; + public static bool UsingBtls => string.Equals (Environment.GetEnvironmentVariable ("MONO_TLS_PROVIDER"), "btls"); + } +} diff --git a/mcs/class/System.Net.Http/corefx/SocketsHttpHandler.Mono.cs b/mcs/class/System.Net.Http/corefx/SocketsHttpHandler.Mono.cs new file mode 100644 index 00000000000..9c19ad4cf55 --- /dev/null +++ b/mcs/class/System.Net.Http/corefx/SocketsHttpHandler.Mono.cs @@ -0,0 +1,45 @@ +// Licensed to the .NET Foundation under one or more agreements. +// The .NET Foundation licenses this file to you under the MIT license. +// See the LICENSE file in the project root for more information. + +using System.Globalization; +using System.Threading; +using System.Threading.Tasks; + +namespace System.Net.Http +{ + partial class SocketsHttpHandler : IMonoHttpClientHandler + { + bool IMonoHttpClientHandler.SupportsAutomaticDecompression => true; + + long IMonoHttpClientHandler.MaxRequestContentBufferSize { + // This property is not supported. In the .NET Framework it was only used when the handler needed to + // automatically buffer the request content. That only happened if neither 'Content-Length' nor + // 'Transfer-Encoding: chunked' request headers were specified. So, the handler thus needed to buffer + // in the request content to determine its length and then would choose 'Content-Length' semantics when + // POST'ing. In .NET Core and UAP platforms, the handler will resolve the ambiguity by always choosing + // 'Transfer-Encoding: chunked'. The handler will never automatically buffer in the request content. + get { + return 0; // Returning zero is appropriate since in .NET Framework it means no limit. + } + + set { + if (value < 0) { + throw new ArgumentOutOfRangeException (nameof (value)); + } + + if (value > HttpContent.MaxBufferSize) { + throw new ArgumentOutOfRangeException (nameof (value), value, + string.Format (CultureInfo.InvariantCulture, SR.net_http_content_buffersize_limit, + HttpContent.MaxBufferSize)); + } + + CheckDisposedOrStarted (); + + // No-op on property setter. + } + } + + Task<HttpResponseMessage> IMonoHttpClientHandler.SendAsync (HttpRequestMessage request, CancellationToken cancellationToken) => SendAsync (request, cancellationToken); + } +} diff --git a/mcs/class/System.Net.Http/System.Net.Http.dll.sources b/mcs/class/System.Net.Http/legacy.sources index 605b0209d0e..4a200fd6e6b 100644 --- a/mcs/class/System.Net.Http/System.Net.Http.dll.sources +++ b/mcs/class/System.Net.Http/legacy.sources @@ -1,11 +1,14 @@ -../../build/common/Consts.cs Assembly/AssemblyInfo.cs +HttpClientHandler.cs +HttpClientHandler.Legacy.cs +IMonoHttpClientHandler.cs +MonoWebRequestHandler.cs +HeaderUtils.Legacy.cs System.Net.Http/ByteArrayContent.cs System.Net.Http/ClientCertificateOption.cs System.Net.Http/DelegatingHandler.cs System.Net.Http/FormUrlEncodedContent.cs System.Net.Http/HttpClient.cs -System.Net.Http/HttpClientHandler.cs System.Net.Http/HttpCompletionOption.cs System.Net.Http/HttpContent.cs System.Net.Http/HttpMessageHandler.cs @@ -52,3 +55,6 @@ System.Net.Http.Headers/TransferCodingHeaderValue.cs System.Net.Http.Headers/TransferCodingWithQualityHeaderValue.cs System.Net.Http.Headers/ViaHeaderValue.cs System.Net.Http.Headers/WarningHeaderValue.cs + +../../../external/corefx/src/System.Net.Http/src/System/Net/Http/SocketsHttpHandler/CancellationHelper.cs +../../../external/corefx/src/System.Net.Http/src/System/Net/Http/SocketsHttpHandler/ConnectHelper.cs diff --git a/mcs/class/System.Net.Http/linux_net_4_x_System.Net.Http.dll.sources b/mcs/class/System.Net.Http/linux_net_4_x_System.Net.Http.dll.sources new file mode 100644 index 00000000000..44361ce2112 --- /dev/null +++ b/mcs/class/System.Net.Http/linux_net_4_x_System.Net.Http.dll.sources @@ -0,0 +1 @@ +#include unix_net_4_x_System.Net.Http.dll.sources diff --git a/mcs/class/System.Net.Http/macos_net_4_x_System.Net.Http.dll.sources b/mcs/class/System.Net.Http/macos_net_4_x_System.Net.Http.dll.sources new file mode 100644 index 00000000000..44361ce2112 --- /dev/null +++ b/mcs/class/System.Net.Http/macos_net_4_x_System.Net.Http.dll.sources @@ -0,0 +1 @@ +#include unix_net_4_x_System.Net.Http.dll.sources diff --git a/mcs/class/System.Net.Http/monodroid_System.Net.Http.dll.sources b/mcs/class/System.Net.Http/monodroid_System.Net.Http.dll.sources index acaa6a38011..f5149e8e161 100644 --- a/mcs/class/System.Net.Http/monodroid_System.Net.Http.dll.sources +++ b/mcs/class/System.Net.Http/monodroid_System.Net.Http.dll.sources @@ -1,2 +1,2 @@ -#include System.Net.Http.dll.sources +#include legacy.sources System.Net.Http/HttpClient.android.cs diff --git a/mcs/class/System.Net.Http/monotouch_System.Net.Http.dll.sources b/mcs/class/System.Net.Http/monotouch_System.Net.Http.dll.sources new file mode 100644 index 00000000000..704cd9f69ab --- /dev/null +++ b/mcs/class/System.Net.Http/monotouch_System.Net.Http.dll.sources @@ -0,0 +1 @@ +#include legacy.sources diff --git a/mcs/class/System.Net.Http/monotouch_runtime_System.Net.Http.dll.sources b/mcs/class/System.Net.Http/monotouch_runtime_System.Net.Http.dll.sources new file mode 100644 index 00000000000..704cd9f69ab --- /dev/null +++ b/mcs/class/System.Net.Http/monotouch_runtime_System.Net.Http.dll.sources @@ -0,0 +1 @@ +#include legacy.sources diff --git a/mcs/class/System.Net.Http/monotouch_tv_System.Net.Http.dll.sources b/mcs/class/System.Net.Http/monotouch_tv_System.Net.Http.dll.sources new file mode 100644 index 00000000000..704cd9f69ab --- /dev/null +++ b/mcs/class/System.Net.Http/monotouch_tv_System.Net.Http.dll.sources @@ -0,0 +1 @@ +#include legacy.sources diff --git a/mcs/class/System.Net.Http/monotouch_watch_System.Net.Http.dll.exclude.sources b/mcs/class/System.Net.Http/monotouch_watch_System.Net.Http.dll.exclude.sources index 5c2ff8a54f8..5fb1f1caa78 100644 --- a/mcs/class/System.Net.Http/monotouch_watch_System.Net.Http.dll.exclude.sources +++ b/mcs/class/System.Net.Http/monotouch_watch_System.Net.Http.dll.exclude.sources @@ -1 +1,7 @@ -System.Net.Http/HttpClientHandler.cs +HttpClientHandler.cs +HttpClientHandler.Legacy.cs +IMonoHttpClientHandler.cs +MonoWebRequestHandler.cs + +../../../external/corefx/src/System.Net.Http/src/System/Net/Http/SocketsHttpHandler/CancellationHelper.cs +../../../external/corefx/src/System.Net.Http/src/System/Net/Http/SocketsHttpHandler/ConnectHelper.cs diff --git a/mcs/class/System.Net.Http/monotouch_watch_System.Net.Http.dll.sources b/mcs/class/System.Net.Http/monotouch_watch_System.Net.Http.dll.sources index a9d766e5eda..cc55cb95b3d 100644 --- a/mcs/class/System.Net.Http/monotouch_watch_System.Net.Http.dll.sources +++ b/mcs/class/System.Net.Http/monotouch_watch_System.Net.Http.dll.sources @@ -1,2 +1,2 @@ -#include System.Net.Http.dll.sources +#include legacy.sources System.Net.Http/HttpClientHandler.platformnotsupported.cs diff --git a/mcs/class/System.Net.Http/orbis_System.Net.Http.dll.sources b/mcs/class/System.Net.Http/orbis_System.Net.Http.dll.sources new file mode 100644 index 00000000000..704cd9f69ab --- /dev/null +++ b/mcs/class/System.Net.Http/orbis_System.Net.Http.dll.sources @@ -0,0 +1 @@ +#include legacy.sources diff --git a/mcs/class/System.Net.Http/testing_aot_full_System.Net.Http.dll.sources b/mcs/class/System.Net.Http/testing_aot_full_System.Net.Http.dll.sources new file mode 100644 index 00000000000..704cd9f69ab --- /dev/null +++ b/mcs/class/System.Net.Http/testing_aot_full_System.Net.Http.dll.sources @@ -0,0 +1 @@ +#include legacy.sources diff --git a/mcs/class/System.Net.Http/testing_aot_full_interp_System.Net.Http.dll.sources b/mcs/class/System.Net.Http/testing_aot_full_interp_System.Net.Http.dll.sources new file mode 100644 index 00000000000..704cd9f69ab --- /dev/null +++ b/mcs/class/System.Net.Http/testing_aot_full_interp_System.Net.Http.dll.sources @@ -0,0 +1 @@ +#include legacy.sources diff --git a/mcs/class/System.Net.Http/testing_aot_hybrid_System.Net.Http.dll.sources b/mcs/class/System.Net.Http/testing_aot_hybrid_System.Net.Http.dll.sources new file mode 100644 index 00000000000..704cd9f69ab --- /dev/null +++ b/mcs/class/System.Net.Http/testing_aot_hybrid_System.Net.Http.dll.sources @@ -0,0 +1 @@ +#include legacy.sources diff --git a/mcs/class/System.Net.Http/unix_net_4_x_System.Net.Http.dll.sources b/mcs/class/System.Net.Http/unix_net_4_x_System.Net.Http.dll.sources new file mode 100644 index 00000000000..ceb22741dfd --- /dev/null +++ b/mcs/class/System.Net.Http/unix_net_4_x_System.Net.Http.dll.sources @@ -0,0 +1,19 @@ +Assembly/AssemblyInfo.cs + +HeaderUtils.SocketsHandler.cs +HttpClientHandler.cs +HttpClientHandler.SocketsHandler.cs +IMonoHttpClientHandler.cs +MonoWebRequestHandler.cs + +../corlib/System.Diagnostics/Debug.cs + +corefx/SocketsHttpHandler.Mono.cs +corefx/NetEventSource.Http.cs + +../../../external/corefx/src/Common/src/System/Net/Http/HttpHandlerDefaults.cs + +../../../external/corefx/src/System.Net.Http/src/System/Net/Http/Headers/*.cs +../../../external/corefx/src/System.Net.Http/src/System/Net/Http/SocketsHttpHandler/*.cs:HttpSystemProxy.cs,SystemProxyInfo.Windows.cs +../../../external/corefx/src/System.Net.Http/src/System/Net/Http/*.cs:HttpClientHandler.*.cs,NetEventSource.Http.cs,DiagnosticsHandler.cs + diff --git a/mcs/class/System.Net.Http/unreal_System.Net.Http.dll.sources b/mcs/class/System.Net.Http/unreal_System.Net.Http.dll.sources new file mode 100644 index 00000000000..704cd9f69ab --- /dev/null +++ b/mcs/class/System.Net.Http/unreal_System.Net.Http.dll.sources @@ -0,0 +1 @@ +#include legacy.sources diff --git a/mcs/class/System.Net.Http/wasm_System.Net.Http.dll.sources b/mcs/class/System.Net.Http/wasm_System.Net.Http.dll.sources index 0a12cc5b5a9..917389ebcae 100644 --- a/mcs/class/System.Net.Http/wasm_System.Net.Http.dll.sources +++ b/mcs/class/System.Net.Http/wasm_System.Net.Http.dll.sources @@ -1,2 +1,2 @@ -#include System.Net.Http.dll.sources -System.Net.Http/HttpClient.wasm.cs
\ No newline at end of file +#include legacy.sources +System.Net.Http/HttpClient.wasm.cs diff --git a/mcs/class/System.Net.Http/win32_net_4_x_System.Net.Http.dll.sources b/mcs/class/System.Net.Http/win32_net_4_x_System.Net.Http.dll.sources new file mode 100644 index 00000000000..704cd9f69ab --- /dev/null +++ b/mcs/class/System.Net.Http/win32_net_4_x_System.Net.Http.dll.sources @@ -0,0 +1 @@ +#include legacy.sources diff --git a/mcs/class/System.Net.Http/winaot_System.Net.Http.dll.sources b/mcs/class/System.Net.Http/winaot_System.Net.Http.dll.sources new file mode 100644 index 00000000000..704cd9f69ab --- /dev/null +++ b/mcs/class/System.Net.Http/winaot_System.Net.Http.dll.sources @@ -0,0 +1 @@ +#include legacy.sources diff --git a/mcs/class/System.Net.Http/xammac_System.Net.Http.dll.sources b/mcs/class/System.Net.Http/xammac_System.Net.Http.dll.sources index 216e48da9cd..c2f4a641674 100644 --- a/mcs/class/System.Net.Http/xammac_System.Net.Http.dll.sources +++ b/mcs/class/System.Net.Http/xammac_System.Net.Http.dll.sources @@ -1,2 +1,2 @@ -#include System.Net.Http.dll.sources +#include legacy.sources System.Net.Http/HttpClient.mac.cs diff --git a/mcs/class/System.Net.Http/xammac_net_4_5_System.Net.Http.dll.sources b/mcs/class/System.Net.Http/xammac_net_4_5_System.Net.Http.dll.sources index 216e48da9cd..c2f4a641674 100644 --- a/mcs/class/System.Net.Http/xammac_net_4_5_System.Net.Http.dll.sources +++ b/mcs/class/System.Net.Http/xammac_net_4_5_System.Net.Http.dll.sources @@ -1,2 +1,2 @@ -#include System.Net.Http.dll.sources +#include legacy.sources System.Net.Http/HttpClient.mac.cs |