4 Commits
Author SHA1 Message Date
Martin Baulig 97adf2e53e HttpClient for Web Assembly. 2019-03-07 21:49:27 +01:00
Martin Baulig 6034bc00c4 Introducing HttpClient.CreateDefaultHandler(). (#13305)
* The default `HttpClient` constructor now calls a static method `CreateDefaultHandler()`;
   we provide a platform-specific implementation of it.

* Replaced `HeaderUtils` with `PlatformHelper` and removed the `LEGACY_HTTPCLIENT` conditional.

* Added a new `socketshandler.sources` file to keep the sources in one place.

* Use a reflection check in the tests instead of the `LEGACY_HTTPCLIENT` conditional.

* This allows us to also get rid of the `SOCKETSHTTPHANDLER` define.
2019-03-06 20:56:42 +01:00
Martin Baulig 7277e3bb5e SslStream improvements and tests
* Add server-side Server-Name-Indication (SNI) support (both AppleTls and BTLS).

* Support the new `SslServerAuthenticationOptions.ServerCertificateSelectionCallback`.

* Server certificate selection is now compatible with CoreFx behavior; first
  checking the new `ServerCertSelectionDelegate` then `LocalCertSelectionCallback`
  and finally using an explicitly provided certificate.

* Misc exception checks and fixes to make behavior consistent with CoreFx;
  any exception thrown by reading / writing the underlying stream will now be
  propagated verbatim (and not wrapped in an `AuthenticationException`);
  exceptions thrown by the handshake / TLS stack itself will still be wrapped.

* Added `System.Net.Security` xUnit tests from CoreFx.

* Misc test cleanups; moved certificate test files from `System.Net.Http` into
  `System` and embed them in the test assembly as resources, adjusting
  `test-helpers/Configuration.Certificates.cs` accordingly.
2019-02-21 20:43:25 +01:00
Martin Baulig 2f411750ac "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.
2019-02-01 14:09:30 +01:00