Commit Graph
747 Commits
Author SHA1 Message Date
Stephen Toub 9ed67baf58 Replace some hardcoded strings in the implementation
Commit migrated from https://github.com/dotnet/corefx/commit/054c6ab6895ccce97e0e9d980503fa12d0d21594
2017-06-26 23:01:42 -04:00
David Shulman 15fcaa332b Address PR feedback
Commit migrated from https://github.com/dotnet/corefx/commit/b690cd329dba0da32824b29eeb3945d6d11f6085
2017-06-24 21:20:40 -07:00
David Shulman 07b1b1c311 Fix some HttpClientHandler properties for UAP
Due to platform differences on UAP and the current use of WinRT APIs to
implement that HTTP stack, a few properties won't have the same defaults
or behavior.

Similar to the decision made in PR dotnet/corefx#21403, don't throw PNSE. Instead
just no-op.

Fixes dotnet/corefx#18036 dotnet/corefx#17812


Commit migrated from https://github.com/dotnet/corefx/commit/0de066e0bc3b67b6bc6fd1db26abea2cda1ce4d9
2017-06-24 14:14:45 -07:00
Hugh Bellamy 7cbcd5ed85 Convert most Assert.Throws<ArgumentException> without param name to AssertExtensions (dotnet/corefx#21455)
* Registry

* Collections

* ComponentModel

* Configuration

* Data

* Globalization

* Drawing

* Diagnostics

* IO

* Linq

* Add System.Net param names in tests

* Move ArgumentExceptions in System.Private.Xml to AssertExtensions

* Add System.Reflection.* ArgumentException param names

* Add param names for System.Runtime* ArgumentExceptions

* Add ArgumentException param names to System.Security.*

* Add ArgumentException param names to System.Text.*

* Add param names to ArgumentExceptions in misc projects

* Add System.Threading.* ArgumentException param names

* Fix missing files

* Fixes for unix and netfx

* Fix more failures and revert a IdnaConformance tests to avoid merge conflicts with dotnet/corefx#21463


Commit migrated from https://github.com/dotnet/corefx/commit/59915687bb261efeae70565d0ca8990ac45ceb9c
2017-06-23 12:33:47 -07:00
David Shulman 21b6b7e235 Fix HttpClientHandler PreAuthenticate property for UAP (dotnet/corefx#21403)
The HttpClientHandler for UAP does not properly implement the PreAuthenticate
property. This is because on UAP, HttpClientHandler is built on the WinRT
APIs which in turn are built on WinInet. And WinInet always uses authentication
caching internally and this results in the net effect of PreAuthenticate always
being "true".

The default for .NET Framework and .NET Core (non-UAP) is "false".

When this property was first added to .NET Core 1.1, the UAP version defaulted
to true and the setter would throw PNSE.

As part of .NET Core 2.0, API surface for networking APIs was expanded. This
resulted in HttpWebRequest exposing and implementing a "PreAuthenticate" property,
which is what it has historically done in .NET Framework. On .NET Core, HttpWebRequest
is built on top of HttpClient. And so, HttpWebRequest was enhanced in .NET Core 2.0
to set the default of PreAuthenticate to false. But this later caused the PNSE
exception to surface and this exception was caught in UWP app-compat testing.
Essentially, we had now created the default HttpWebRequest to always throw an
exception.

So, in PR dotnet/corefx#18105, the PNSE in HttpClientHandler.PreAuthenticate was commented out
and thus the setter became a no-op.

This PR basically acknowledges this situation and removes the TODO from this change.
Since there is no good way to implement the actual HttpClientHandler.PreAuthenticate
property, I left the getter default to return "true" which is closer to reality of
what happens on UAP (even though this default value is different from .NET Framework
or the rest of .NET Core). And, in terms of the setter for the property, I opted to
leave it as a no-op. This seems like the best compromise outcome for now and will
generate less distraction for developers rather than throwing an exception all the
time.

The rest of this PR moves the ActiveIssue's from the class level to the method level
as part of eventually solving all of them. In addition, I added a new test case to
validate the HttpClientHandler constructor defaults that are different on the UAP
platform.

Fixes dotnet/corefx#18104

Commit migrated from https://github.com/dotnet/corefx/commit/c3b2f15d90972a5607415582681584965f16c01d
2017-06-23 05:26:07 -04:00
Stephen Toub c8becd18b6 Merge pull request dotnet/corefx#21232 from stephentoub/managedhttpclient
Add managed HttpClientHandler prototype as opt-in

Commit migrated from https://github.com/dotnet/corefx/commit/93ee4ba40c82d5aca978447cb3e14c4ef7e7fd53
2017-06-22 20:02:18 -04:00
Stephen Toub e48e6320e3 Disable ManagedHandler tests temporarily
Commit migrated from https://github.com/dotnet/corefx/commit/7715ca680965f3d0de70875c6a788e36e404e6dd
2017-06-22 18:35:34 -04:00
David Shulman 59cc606beb Fix DefaultProxyCredentials edge case on NETFX
After my PR dotnet/corefx#21325, I discovered an edge case where we need to check for
a non-null Proxy property in the underlying WebRequest.

On .NET Framework, System.Net.Http is built on WebRequest
(HttpWebRequest) and is subject to side-affects from it. The static
property WebRequest.DefaultWebProxy affects the initial value of
WebRequest.Proxy. So, it's possible that a developer may have set
WebRequest.DefaultWebProxy to null prior to using System.Net.Http in the
app.

The net affect of this is that that won't be any proxy used as the
system default proxy and thus the
HttpClientHandler.DefaultProxyCredentials is ignored.

On .NET Core, there is no relationship between System.Net.Http and
System.Net.WebRequest.  So, in all cases on .NET Core, where a developer
has specified HttpClientHander.UseProxy=true and HttpClientHandler.Proxy
= null (default values), the handler will always try to use the system
default proxy (if configured).


Commit migrated from https://github.com/dotnet/corefx/commit/eac755df47f70e5ef3853c0b71ed4ab12455bb96
2017-06-22 09:52:34 -07:00
Stephen Toub 1de0cf31b0 Integrate ManagedHandler into Windows and Unix builds
- Add a ManagedHandler field to both the Windows and Unix HttpClientHandler builds, and change the members to switch based on which is being used.  The default is still to use WinHttpHandler and CurlHandler respectively, but setting an environment variable prior to constructing an HttpClientHandler will switch it to use ManagedHandler.
- Add test classes that will run the tests again but with the managed handler.  Some of the test classes are commented out due to current failures.
- Fixed a few tests.


Commit migrated from https://github.com/dotnet/corefx/commit/b238d0d760a2588513c443f3a4c991222fd037bb
2017-06-22 09:26:46 -04:00
Geoff Kizer 1e97b3d02d Initial prototype of managed HttpClientHandler
Commit migrated from https://github.com/dotnet/corefx/commit/0893c2a886f4cef21697a570a26819b0c7640f9c
2017-06-22 09:26:46 -04:00
David Shulman 093520dcc8 Fix HttpClientHandler.DefaultProxyCredential on NETFX
This bug was discovered in internal testing when this code was being
ported to .NET Framework vNext.  Due to all these tests being previously
disabled on NETFX, the bug was missed.

The HttpClientHandler.DefaultProxyCredentials property is only used when
an explicit proxy is not specified (HttpClientHandler.Proxy==null) but a
proxy is still desired (HttpClientHandler.UseProxy==true). In this case,
the semantics implied are to use the system default proxy settings to
find a proxy.  In that case, the credentials specified by
DefaultProxyCredentials should be passed to the webrequest.Proxy object
which, by default, points to the system proxy.


Commit migrated from https://github.com/dotnet/corefx/commit/e5306b55c0267c0369e5da9bef0467d2ea4e9b51
2017-06-21 12:33:23 -07:00
Stephen Toub d0331b469f Fix MaxResponseContentBufferSize handling (dotnet/corefx#21145)
It's not causing failures in all cases it should, as it's comparing against a buffer size that may have grown to be larger than the desired max.

Commit migrated from https://github.com/dotnet/corefx/commit/517b9dd71b83659b4ce5fbd7f4fe1b749a7579b1
2017-06-16 21:54:25 -04:00
David Shulman d81ad4080f Disable bad certificates tests on Windows (dotnet/corefx#21090)
Due to issues with dotnet/corefx#7812 and certificates using DHE ciphers, we're
disabling these tests on Windows for now.

I am in the process of moving these tests from the *.badssl.com servers
to servers that we control in Azure that won't use DHE cipher suites.

Related to dotnet/corefx#7812

Commit migrated from https://github.com/dotnet/corefx/commit/187bf4cd817637a3505d69f1c08ec80938b02d82
2017-06-15 13:38:09 -04:00
Tarek Mahmoud Sayed 8754550d62 Enable UAP Remote Execution for all tests (dotnet/corefx#21014)
This change to enable remote execution of all corefx tests in UAP. Because the remote execution code for UAP is using WinRT APIs and to avoid forcing adding UAP configuration to all test projects, we factor the remote execution code into its own test library (called TestHelper) which is cross compiled.

Commit migrated from https://github.com/dotnet/corefx/commit/eb2f543b189e8f7f9ae4c31e832ac9d3c22bb41a
2017-06-14 13:26:57 -07:00
Kristian Hellang 48be6a37c8 Remove default libcurl Content-Type header for empty POST requests (dotnet/corefx#20738)
* Added test to make sure Content-Type isn't sent for empty POST requests

* Remove default libcurl Content-Type header for empty POST requests


Commit migrated from https://github.com/dotnet/corefx/commit/fdb309f1421d4006c609097fd4b48443d3b1ad18
2017-06-06 17:46:41 -04:00
David Shulman 7991f4d912 Fix WinHttpResponseStream when reading 0 bytes
Fixes dotnet/corefx#20676


Commit migrated from https://github.com/dotnet/corefx/commit/f6e51aec3270102234386454063d66251f3b901b
2017-06-05 10:43:39 -07:00
Stephen Toub a18f9870b9 Fix HttpClient on Unix handling of 0-len content with chunked upload
Commit migrated from https://github.com/dotnet/corefx/commit/c4fe0654ddc54d1ddb505d020f38392b3a552032
2017-05-31 00:04:37 -04:00
Jose Perez Rodriguez 7ce5531fcc Fixing System.Net.Http.Functional tests on uapaot
Commit migrated from https://github.com/dotnet/corefx/commit/692343761c582dba996f83abfffe150bf854a614
2017-05-26 11:24:34 -07:00
Stephen Toub e687c3c3ae Merge pull request dotnet/corefx#20145 from safern/DisableNetTests
Disable System.Net.* tests for issue dotnet/corefx#19967

Commit migrated from https://github.com/dotnet/corefx/commit/d59a6a31c7a9106821443002b04ce56b82f0b35f
2017-05-22 23:11:28 -04:00
Santiago Fernandez 96d1270381 Disable System.Net.* tests for issue dotnet/corefx#19967
Commit migrated from https://github.com/dotnet/corefx/commit/ec8df2b33e5a155325228fda75792c5319126f28
2017-05-22 16:32:50 -07:00
Santiago Fernandez Madero c65dd7a4bd Test attributes cleanup for Uap now that Uap flag includes UapAot (dotnet/corefx#20108)
* Update xunit extensions to unify TargetFrameworkMonikers.Uap to include UapAot

Commit migrated from https://github.com/dotnet/corefx/commit/652d12bf31606eeef8fe8b9a7bf1cc7af06f6352
2017-05-22 15:10:24 -07:00
David Shulman 86808fb7eb Merge pull request dotnet/corefx#20011 from schen381/7812_code
Investigate WinHttpException: buffer too small

Commit migrated from https://github.com/dotnet/corefx/commit/c107332781a8cb326d674a825f8817e18d464df6
2017-05-22 13:06:56 -07:00
David Shulman d899bda510 Disable System.Net.Http tests on UAP/UAPAOT (dotnet/corefx#20017)
Disable a bunch of System.Net.Http tests on UAP/UAPAOT platform.

Both inner and outer loop tests now run clean for System.Net.Http

Commit migrated from https://github.com/dotnet/corefx/commit/38cd7f91dbbc5ac4001bf15762a8e244f5ec3a70
2017-05-19 14:28:54 -07:00
Caesar Chen cb13973e33 Add instrumentation for now to catch unexpected errors and fail fast and produce a crash dump
Commit migrated from https://github.com/dotnet/corefx/commit/eb28853edaa8f3efcce225e3cbec5e1500be57b4
2017-05-19 11:46:13 -07:00
Eric St. John 67a1a83adf Update configurations
Commit migrated from https://github.com/dotnet/corefx/commit/a152026c63c03dda2e470b780ecb4b3aa9671e11
2017-05-19 10:17:08 -07:00
David Shulman 15b8a4aa17 Fix some Http tests for UAP
Fixed some of the HttpRequestMessage tests for UAP. HttpRequestMessage has a different
default value for the Version field.

Added PlatformDetection.IsUap to support this. Implementation of this property was
based on investigations for dotnet/corefx#19907. This property is true on both 'uap' and 'uap-aot'
tests.

Fixes dotnet/corefx#19907


Commit migrated from https://github.com/dotnet/corefx/commit/8455655dc0ee18d361d1669cb45fb191189c82f6
2017-05-18 15:05:12 -07:00
David Shulman 86752295b4 Merge pull request dotnet/corefx#19943 from davidsh/http_uwp
Fix Http Unit Tests

Commit migrated from https://github.com/dotnet/corefx/commit/5da23d0a0ba52936009220b1e2dc2bbdbf4602ef
2017-05-18 14:31:45 -07:00
David Shulman 5ca9996b44 Fix Http Unit Tests
Fixed the System.Net.Http Unit Tests so that they build and run properly
for uap and uap-aot scenarios.

Removed the ICloneable.cs file which is no longer needed now that master
branch has ICloneable support in it.


Commit migrated from https://github.com/dotnet/corefx/commit/443f58923e1c2263cd81efce751123a21935febc
2017-05-18 13:48:48 -07:00
Stephen Toub 874449be70 Special-case DangerousAcceptAnyServerCertificateValidator on Unix
In situations where setting ServerCertificateValidationCallback would result in a PlatformNotSupportedException, if it was set to DangerousAcceptAnyServerCertificateValidator instead simply disable CURLOPT_SSL_VERIFYPEER and CURLOPT_SSL_VERIFYHOST.  This enables a common case of `delegate { return true; }` to work on libcurls with non-SSL backends, such as the default on macOS.


Commit migrated from https://github.com/dotnet/corefx/commit/65bdb971e1d97c930c59939ed7ac3f7ab364bfb0
2017-05-18 13:49:15 -04:00
Stephen Toub aed0fee2f6 Add DangerousAcceptAnyServerCertificateValidator property to HttpClientHandler
Commit migrated from https://github.com/dotnet/corefx/commit/2a9435284246f914dc854e195428527b38e52aae
2017-05-18 13:49:15 -04:00
Liudmila Molkova 96e2928827 Fix SendAsync_ExpectedDiagnosticSourceActivityLogging test (dotnet/corefx#19796)
* Fix SendAsync_ExpectedDiagnosticSourceActivityLogging failed after dotnet/corefx#19689

* Address PR feedback

* Dispose response in all tests


Commit migrated from https://github.com/dotnet/corefx/commit/b9b30609ebf882c58c57f493af2991512a094aa1
2017-05-16 23:00:47 -04:00
Stephen Toub 11453f6c04 Update ActiveIssue issue number
Commit migrated from https://github.com/dotnet/corefx/commit/7601889b85432f4bba449dd7d940edc2b438832e
2017-05-16 09:07:26 -04:00
Stephen Toub dd012eb249 Disable UseCallback_BadCertificate_ExpectedPolicyErrors test on Windows
It's taking out too many outerloop runs.

Commit migrated from https://github.com/dotnet/corefx/commit/dbe48df24903f403a2785bb61268a91d52064ca0
2017-05-16 08:43:30 -04:00
Jason Lin 996a786159 Enable most corefx tests for Bash on Windows
Many corefx tests are skipped when running on Bash on Windows. As of Win10 Creators Update, most of these skipped tests now pass, so they can now be enabled.


Commit migrated from https://github.com/dotnet/corefx/commit/cf3c7d5a3283da40e8a2849e8776e23c7292fb41
2017-05-14 21:02:27 -07:00
Lakshmi Priya Sekar 6e1c230123 Skip failing test to unblock CI.
Commit migrated from https://github.com/dotnet/corefx/commit/826e35d9e49eef821f7ea11c895008c49fdf1b3e
2017-05-12 11:05:27 -07:00
Viktor Hofer 3ca0ce0c5e Disabled test cause of random execution order of xunit (dotnet/corefx#19690)
Commit migrated from https://github.com/dotnet/corefx/commit/2cbad51b6421073d9cb8071a753095d990d2f275
2017-05-11 20:49:50 -07:00
Lakshmi Priya Sekar afb8212e7f Merge pull request dotnet/corefx#19622 from Priya91/ekuoid
Fixing OID EKU validation.

Commit migrated from https://github.com/dotnet/corefx/commit/0eeb35b0add4a8d1041a56de85409526c9466cac
2017-05-10 18:15:37 -07:00
Lakshmi Priya Sekar d13b95a549 Fixing OID EKU validation.
Commit migrated from https://github.com/dotnet/corefx/commit/023ecc91671ea48a0e27d466d13003d4830d671a
2017-05-10 13:29:13 -07:00
Stephen Toub 52d5beec99 Disable SendAsync_ReadFromSlowStreamingServer_PartialDataReturned test on netfx
This test sends some of the data planned by Content-Length but keeps the connection open; the client is then supposed to read that data and verifies that it got only what was sent and didn't hang.  But it's hanging on netfx.  The problem is that ConnectStream.BeginRead on netfx first reads what it has buffered, and if it doesn't have buffered as much as was asked for, it then issues an asynchronous read rather than just returning the what it has.


Commit migrated from https://github.com/dotnet/corefx/commit/2f19b380923cfeb8a7387d6c9cfad30a0b713f38
2017-05-10 15:06:43 -04:00
Stephen Toub a4a3232bd0 Fix remaining TODOs for SocketTaskExtensions tests
Commit migrated from https://github.com/dotnet/corefx/commit/e4977eb30a1226d736ab611cfed4632ccbac90b1
2017-05-10 09:44:40 -04:00
Stephen Toub 2cf805c189 Merge pull request dotnet/corefx#19415 from stephentoub/add_winhttp_exc_diagnostics
Add exception diagnostics to WinHttp

Commit migrated from https://github.com/dotnet/corefx/commit/5265ea933604e590beb4837a90a1b71fb2386b3f
2017-05-05 22:52:52 -04:00
Stephen Toub c26f7d9cb9 Ignore lack of CURLMOPT_MAX_HOST_CONNECTIONS in CurlHandler
Versions before 7.30 don't have this option.  Previously we would throw a PlatformNotSupportedException.  As devs would generally use an option of this type to increase the limit (since historically such a limit was 2 or 10 in the .NET Framework) rather than decrease it, and since it's already effectively infinite by default in .NET Core, with this commit, now we just ignore it.  This helps to avoid PNSEs on the few platforms that still ship with too old a version of libcurl.


Commit migrated from https://github.com/dotnet/corefx/commit/113a7d5c47c5c0ab2aa8d7d39acf34a4e1618b24
2017-05-05 19:09:13 -04:00
Stephen Toub 85f212528e Add exception diagnostics to WinHttp
To help diagnose pernicious exceptions, this debug-build-only change augments exceptions created using CreateExceptionUsingError to include the calling thread's stack trace, so that when these exceptions are then moved to other threads and propagated there, we can better correlate where they came from.


Commit migrated from https://github.com/dotnet/corefx/commit/2c368e81d9d07f0d40edf36047e5b93e44db200b
2017-05-05 18:16:38 -04:00
FAREAST\v-lijiay f7b7e47d8f Disable failed test for issue 19038.
Commit migrated from https://github.com/dotnet/corefx/commit/2f6fc5e6ff048f6fcf6bbf42854bac1a79137064
2017-05-04 01:57:41 -07:00
Alex Perovich 72abd52557 Fix S.Net.Http.Functional.Tests on AoT (dotnet/corefx#19133)
* Fix S.Net.Http.Functional.Tests on AoT

* Use partial files

* Use braces


Commit migrated from https://github.com/dotnet/corefx/commit/f8f72de4a453151ee38322166ffec0000ee3a7c6
2017-05-02 06:49:19 -04:00
Stephen Toub 9401004824 Stop disposing of request content in HttpClient
HttpClient on Unix fails for some sites, in cases where the site sends a response before it’s fully received the entirety of the request.  That’s because HttpClient has logic to Dispose of the request content once the Task returned from the handler’s SendAsync completes, and unlike WinHTTP, libcurl doesn’t require that the whole request be sent before any of the response is processed.  That means that CurlHandler may receive the response (or the response headers), complete the SendAsync task, but still be reading from the request content, which may then be disposed of by HttpClient while it’s still in use, causing potential corruption, exceptions, etc.

The Dispose behavior has other problems with it.  A more generalized version of the above is that it prevents handlers that want to support full duplex communication, since it essentially requires that the whole request be sent before the response is processed.  It also forces extra cost onto consuming code in some situations, as it means that the request content objects can’t be pooled and reused (since disposal typically invalidates objects for such a purpose, though in some cases a custom content could be developed to override and ignore Dispose).

A variety of approaches were explored to address this:
- Change CurlHandler to only complete the SendAsync Task when both the request has been fully sent and the appropriate portion of the response has been received.  This is problematic, though, as with the pull model employed by libcurl, we don’t know reliably when the request has been fully sent.
- Change the disposal to be handled by the handlers rather than by HttpClient.  This could help in that a handler like CurlHandler could simply defer disposal until libcurl tells it the “easy” operation is done.  But it has other downsides. Today code can use an HttpClientHandler without HttpClient, e.g. by using HttpMessageInvoker instead of HttpClient, in which case it bypasses this disposal logic (and other logic provided by the relatively thin HttpClient wrapper). If we were to move the disposal logic to the HttpClientHandler, now such code that was never having its request content disposed will start to, which is bad and exactly the opposite of what we want. It also causes problems for chains of handlers, e.g. if HttpClient is given a handler that wraps CurlHandler, and that handler expects to be able to look at the request content after the SendAsync Task from CurlHandler completes but before it itself completes its SendAsync Task. And while such a scenario may seem far fetched, we effectively have it in the bits today: the diagnostic handler that's used to pass details off to DiagnosticListeners is injected in the middle like this, and it does pass off the request content after the wrapped SendAsync Task completes... if a listener was expecting a non-disposed request content at that point, it would be sorely disappointed.
- Simply stop disposing.  The primary downside here is existing code that may have expected disposal to happen, e.g. if a StreamContent wrapping a FileStream isn't explicitly disposed of by the app code, cleanup of the FileStream will be left to its finalizer.

The least bad option is to simply stop disposing.  This PR makes that change.


Commit migrated from https://github.com/dotnet/corefx/commit/6d06c39857f8bb7a798ca118944d25a43aaa8beb
2017-04-28 07:13:43 -04:00
Stephen Toub b5f9dd78d7 Tweak the SendAsync_ExpectedDiagnosticCancelledActivityLogging test
A few tweaks to hopefully either fix the test(s) or at least help to further isolate the cause for the hangs.


Commit migrated from https://github.com/dotnet/corefx/commit/f14bf2ba1c4cf5c0de4a37d90abe091ebd9133ce
2017-04-26 17:52:11 -04:00
David Shulman c7e96c847e Root cause PostScenarioTests (Http) test failures on NETFX
Fixed a test bug in PostAuthHelper which caused the wrong entity-body
semantics to get used during the test. This actually exposed a netfx
bug dealing with ambiguous semantics (Content-Length vs. chunked).

After fixing this test bug, it then exposed a product bug where we
leak an InvalidOperationException that isn't wrapped properly by an
HttpRequestException. The scenario that exposed this related to
POST'ing content that is non-rewindable and having to resubmit the
POST due to authentication challenges. This test was passing on
.NET Core because the test was written using the wrong assumptions.
It failed on .NET Framework which exposed the problem.

The InvalidOperationException comes from when a StreamContent's
SerializeToStreamAsync method is called and the content needs to be rewound.
If the content can't be rewound, then the exception is thrown with the
error message "The stream was already consumed. It cannot be read again."

Updated the WinHttpHandler and CurlHandler to wrap the InvalidOperationException
in an HttpRequestException. Updated the test accordingly.

Fixes dotnet/corefx#17621.


Commit migrated from https://github.com/dotnet/corefx/commit/e7e3c581870787d87393e674db22589ad56e944c
2017-04-25 09:40:33 -07:00
David Shulman 538018e43d Address PR feedback
Commit migrated from https://github.com/dotnet/corefx/commit/6f9338617df7f20dcccb64e5b72c8f8afc823066
2017-04-24 17:24:00 -07:00
David Shulman 3505e5abfd Root cause System.Net.Requests test failures on NETFX
Finished investigation of failures on .NET Framework for
System.Net.Http.

Added specific NETFX test changes where necessary. Opened up additional
bugs for investigation.

Added missing parameter validation for HttpClientHandler.MaxConnectionsPerServer
for the net46 OOB. This matches .NET Core now.

Removed some test code that was incorrectly trying to do CredentialCache.Add()
with a 'basic' authtype and using DefaultCredentials. This is invalid and
throws exception on netfx. Added dotnet/corefx#18870.

Remove PlatformNotSupportedProxy test code. It was throwing an exception
on netfx and the purpose of it didn't seem to make sense in the one test
that was using it.

Fixes dotnet/corefx#17691.


Commit migrated from https://github.com/dotnet/corefx/commit/b1246c7f1ee1d9e42594988073fd06580d23fe84
2017-04-24 14:09:31 -07:00