Commit Graph
1728 Commits
Author SHA1 Message Date
Caesar Chen fa7034df2c Revert "Fix Uri.Host for IPv6 Link-local address (dotnet/corefx#29829)" (dotnet/corefx#30062)
This reverts commit dotnet/corefx@f7a8cf12a8.

Commit migrated from https://github.com/dotnet/corefx/commit/e5bb0b511adcc66ccc62a3019e11f60cb93c3a40
2018-06-04 14:41:21 -07:00
Tomas Weinfurt 7af1cdf826 add test for dotnet/corefx#26732 (dotnet/corefx#30124)
* add test for dotnet/corefx#26732
* feedback from reviews


Commit migrated from https://github.com/dotnet/corefx/commit/c56f4cda3ca772108a8de0cf3f5ad65a139e7204
2018-06-04 12:27:55 -07:00
Stephen Toub 1c92a0312c Remove stale TODO from HttpConnection.cs
Commit migrated from https://github.com/dotnet/corefx/commit/eaba0885c15404b41aa9a5113cf7cc8e7252053c
2018-06-04 11:24:23 -04:00
Stephen Toub dc14dd4f44 Fix Expect: 100-continue handling when no request content (dotnet/corefx#30102)
A developer can specify that an Expect: 100-continue header be sent even if there's no request content, in which case SocketsHttpHandler dutifully sends the header.  In response, a server might still send back a 100 continue status line and an empty line (e.g. "HTTP/1.1 100 Continue\r\n\r\n"), and then send back the final response, including another status line, headers, etc.  SocketsHttpHandler isn't expecting the second status line if there wasn't any request content, in which case it ends up misinterpreting everything after the 100 continue status line and empty line as being response body content.  That has many bad side effects, including not parsing any of the actual response headers.  And since it doesn't get any response headers that indicate the response body is of a known content length or transfer-chunk encoded, it believes the response only ends when the connection is closed.  But this is HTTP 1.1, and the server is likely keeping the connection open for reuse, and thus the client hangs.

Commit migrated from https://github.com/dotnet/corefx/commit/909dc9eb3ba829647c45348c85bc9271019c509f
2018-06-02 23:37:09 -04:00
Stephen Toub 099776af7a Fix spacing in HttpConnectionPool.ToString() (dotnet/corefx#30100)
This string is output as part of tracing, and the name is getting squished up against the url, e.g. "HttpConnectionPoolhttp://microsoft.com" rather than "HttpConnectionPool http://microsoft.com".

Commit migrated from https://github.com/dotnet/corefx/commit/73d0e4adcbea7726ad67346639cb4df7379dae93
2018-06-02 21:33:57 -04:00
David Shulman ef3c76c2d1 Investigate / skip failing UAP Http tests (dotnet/corefx#30064)
Worked thru most of the tests previously disabled. Opened new issues for a bunch of them
with detailed analysis. Some tests are being permanently skipped due to differences in UAP
platform.

Contributes to dotnet/corefx#29802

Commit migrated from https://github.com/dotnet/corefx/commit/4e91b8620498cc82faafecb619bca630e277d6d3
2018-06-02 09:30:22 -07:00
Stephen Toub 998cdde08b Add test for ExpectContinue with no content (dotnet/corefx#30065)
* Add test for ExpectContinue with no content

* Address PR feedback


Commit migrated from https://github.com/dotnet/corefx/commit/3ae01e959c3e1789e3620a2d0e843b46c772031b
2018-06-02 08:58:33 -04:00
Martijn Laarman ea0ba1301e Add All enum value to DecompressionMethods (dotnet/corefx#30075)
Fixes dotnet/corefx#29243

Updates the Decompression tests to explicitly use
DecompressionMethods.All

Commit migrated from https://github.com/dotnet/corefx/commit/3c2ce7b352873d2faa088d07b06bc96a00f44e0e
2018-06-02 08:58:01 -04:00
David Shulman 2ed92622d1 Increase timeout for Http cancellation test (dotnet/corefx#30025)
We haven't seen this set of tests fail often. But when they do, it seems to take a little more
than 30 seconds (31 in this failure case) for the operation to cancel. The original "30" second
number was a guess. But based on busy CI machines, we'll increase the number in the hope of
getting less test failures.

Closes # 28805

Commit migrated from https://github.com/dotnet/corefx/commit/81b0f7764d815fcac8b6667d81cc05a25f6ebe99
2018-05-31 17:26:02 -04:00
David Shulman 355c719516 Fix proxy connect tunnel test (dotnet/corefx#30007)
The test was hanging on most handlers except for SocketsHttpHandler. It was hanging because
the await'ed task of connecting to the proxy never happened. Except for SocketsHttpHandler,
the other handlers optimize loopback so that if the destination server is on loopback, then it
ignores any proxy setting. The test was using both a loopback destination server as well as a
loopback proxy server.

This test is one of the few tests that do an end-to-end request/response thru a proxy. So, it's
important that we keep the test and have it work on all handlers. Modified the test to use a real
external server destination. The test still uses a loopback proxy server.

I also moved some of the Outerloop tests to Innerloop since those tests were using loopback.

Fixes dotnet/corefx#27746


Commit migrated from https://github.com/dotnet/corefx/commit/2edbc59c653533c1a0ae91882d482ae148cb92be
2018-05-31 13:17:21 -07:00
David Shulman dfb7ac451c Remove obsoleted comment from SocketsHttpHandlerTest (dotnet/corefx#30020)
Similar to PR dotnet/corefx#29988, testing implementation details of SocketsHttpHandler behaviors
doesn't make sense against the other handlers.

Running HTTP tests generally across all the handlers is useful when we're trying to
validate HTTP protocol and API behaviors to be consistent everywhere.

However, testing SocketsHttpHandler implementation details, such as connection-pooling
algorithms, with other handlers leads to brittle tests with random test failures. The
internal code of each handler and native code (i.e. WinHTTP) use different rules
(timeouts, lifetime, etc.) for such low-level connection details.

So it makes sense to only run tests such as this against the code that was written to
match the tests, i.e. SocketsHttpHandler.

Closes dotnet/corefx#27272

Commit migrated from https://github.com/dotnet/corefx/commit/31f7b653fe62317c7edd5c3fc59430462197934d
2018-05-31 13:52:16 -04:00
David Shulman 2aefe4af59 Only run ResponseDrain tests on SocketsHttpHandler (dotnet/corefx#29988)
Running HTTP tests generally across all the handlers is useful when we're trying to validate HTTP protocol and API behaviors to be consistent everywhere.

However, testing SocketsHttpHandler implementation details, such as connection-drain algorithms, with other handlers leads to brittle tests with random test failures. The internal code of each handler and native code (i.e. WinHTTP) use different rules for such low-level connection details.

So it makes sense to only run tests such as this against the code that was written to match the tests, i.e. SocketsHttpHandler.

Closes dotnet/corefx#28424
Closes dotnet/corefx#28206

Commit migrated from https://github.com/dotnet/corefx/commit/2c734d6db0a8009150bac59f13960f463528ba76
2018-05-30 15:09:26 -07:00
David Shulman f615d5016a Add HttpClient test for sending rewindable content stream (dotnet/corefx#29971)
Issue dotnet/corefx#23782 was opened describing a behavior difference in Linux versus
Windows regarding the final position of a stream after being sent. This
turned out to be a behavior in CurlHandler that we decided to not fix.

This PR adds a test to document the behavior of resending a request body
content object (now possible now since we no longer dispose request content
after send). This test is only validating the default HttpClientHandler
which is SocketsHttpHandler now. It also matches .NET Framework behavior.

Closes dotnet/corefx#23782


Commit migrated from https://github.com/dotnet/corefx/commit/b46045f9132597e1600e3ceafd6bbeb272576a62
2018-05-30 14:18:39 -07:00
David Shulman 6813abda80 Update Http test comment about SSL auth and Host header (dotnet/corefx#29987)
This test is only relevant for .NET Framework and .NET Core with SocketsHttpHandler.

Closes dotnet/corefx#24947

Commit migrated from https://github.com/dotnet/corefx/commit/e02f9e86210d7c39c6ccae7a5bcfd05d510dddb5
2018-05-30 13:25:31 -07:00
Marco Rossignoli 5e60723a46 Fix Uri.Host for IPv6 Link-local address (dotnet/corefx#29829)
Contributes to dotnet/corefx#28863

Replace PR dotnet/corefx#29769 after revert dotnet/corefx#29818 for Outerloop CI fail

This PR address the second part of issue:

Uri.Host LLA (Link-local address) IPv6 address doesn't contain %number part.
Currently it returns [fe80::e077:c9a3:eeba:b8e9], it should return [fe80::e077:c9a3:eeba:b8e9%18].

Note: Uri.IdnHost correctly contains the %number part.


Commit migrated from https://github.com/dotnet/corefx/commit/f7a8cf12a89dafccbc98cff160346c2ff3e15ba0
2018-05-30 10:58:09 -07:00
ares128 a3b99c346d check SwitchingProtocol before ContentLength (dotnet/corefx#29948)
* check SwitchingProtocol before ContentLength

In case some websocket retrun ContentLength =0 with SwitchingProtocol

* Update LoopbackHelper To ContentLength: 0

Test Situation when Content-Length: 0 with SwitchingProtocols


Commit migrated from https://github.com/dotnet/corefx/commit/8063d42defc2f5d8afc1053273347cf3384673ef
2018-05-30 09:29:16 -07:00
David Shulman 8e11e35537 Fix auto decompression behavior in Http handlers (dotnet/corefx#29903)
Fixed a few bugs in both WinHttpHandler and SocketsHttpHandler regarding the behavior of
'Accept-Encoding' request headers and automatic decompression of response body content.

On Windows 7, native WinHTTP doesn't support automatic decompression. That also means it doesn't automatically append 'Accept-Encoding' request headers. WinHttpHandler was relying on WinHTTP to add those headers. But it wasn't happening on Windows 7. So, now WinHttpHandler will make sure those headers are added if not already present. WinHttpHandler was also always decompressing content even when the encodings in the .AutomaticDecompression property didn't match.

SocketsHttpHandler had a different bug. It would make sure that the 'Accept-Encoding' headers were
present when .AutomaticDecompression was being used. But it wouldn't check for existing headers and duplicate encodings would be present in the outbound 'Accept-Encoding' request header.  I.e., it would end up with "Accept-Encoding: gzip, gzip".

In addition to fixing these bugs, I added more tests to both Http Functional and WinHttpHandler Unit
tests (which can simulate running on Windows 7 using the existing mocks).

Fixes dotnet/corefx#29747
Fixes dotnet/corefx#26991


Commit migrated from https://github.com/dotnet/corefx/commit/40ce4cb20270f731d7d826291e1edce8d1ce2c37
2018-05-25 14:48:26 -07:00
Stephen A. Imhoff fb1798288f Consolidate http date parsing (dotnet/corefx#28843)
* Add implementation to common

* Shift System.Net.Http to use common HttpDateParser

* Clean up whitespace in affected areas of System.Net.Requests

* Update System.Net.Request to use common Http date parsing

* Switch to InvariantCulture in tests

* Specify type.

* Remove unneeded file.

* Remove unneeded parameter

* Don't cache parameters.

* Let 'r' be handled like in System.Net.Http

System.Net.Http handled the 'r' format by letting a format string that didn't require leading zeros to be used, meaning one format string can be removed from consideration.


Commit migrated from https://github.com/dotnet/corefx/commit/deee13b99d441cf1906397c54d0c5afcf8385d92
2018-05-24 10:39:16 -04:00
David Shulman 698cedb4c0 Fix HttpClient TLS tests (dotnet/corefx#29851)
Native WinHTTP sometimes uses multiple TCP connections to try other TLS protocols when
getting TLS protocol failures as part of its TLS fallback algorithm. The loopback server
doesn't expect this and stops listening for more connections. This causes unexpected test failures.

I confirmed this investigation comparing with a non-loopback server and WireShark traces. I discussed
this with the WinHTTP team.

SocketsHttpHandler, which uses SslStream for TLS, is able to optimize this and looks directly at
the TLS server-hello to determine if the connection is going to be compatible with the allowed client
TLS protocols. So, it doesn't use multiple TCP connections to determine a final failure outcome.

I also cleaned up the test code removing duplicate tests.

Fixes dotnet/corefx#8538

Commit migrated from https://github.com/dotnet/corefx/commit/226b225df8873b5c7a79d027119871834b24a7d4
2018-05-22 12:37:49 -07:00
Stephen Toub 9aa30c9d3d Fix SocketsHttpHandler handling of pooling timeouts with max connections (dotnet/corefx#29822)
* Fix SocketsHttpHandler handling of pooling timeouts with max connections

Fixes two cases:
1. When a pooling timeout (lifetime or idle) is set to 0, we fail to enforce the MaxConnectionsPerServer limit.
2. When MaxConnectionsPerServer is set and the limit is reached, when a request completes and we transfer the connection from the completing request to a waiting request, we fail to check / enforce the connection lifetime limit.

* Address PR feedback


Commit migrated from https://github.com/dotnet/corefx/commit/50e30118b37db1c3a48a0920e670b9ca5f9631d4
2018-05-22 11:32:10 -04:00
Maryam Ariyan aa841d48e0 Modify corefx to use ConcurrentQueue from shared
Commit migrated from https://github.com/dotnet/corefx/commit/13e9d66f6051db2f6be532803ef3ab66807fd992
2018-05-22 09:19:22 -04:00
David Shulman e7ae16d343 Disable Http tests on UAP (dotnet/corefx#29803)
Many dozen of Http tests are failing on UAP test runs. This is not showing up during PR/CI
because the UWP leg only is building the product and test sources and not actually running
any tests. However, the test failures show up in Helix and also when run locally on a dev machine.

So, for now, I'm disabling some of these tests so that the inner and outer test runs will pass.

Contributes to dotnet/corefx#29802
Closes dotnet/corefx#27953

Commit migrated from https://github.com/dotnet/corefx/commit/3326f3f24dd083f0966c8f71c7d1e8c2caa1ddae
2018-05-20 09:33:35 -04:00
David Shulman 0de1bd3ee8 Change EnsureSuccessStatusCode to not dispose response content (dotnet/corefx#29795)
* Change EnsureSuccessStatusCode to not dispose response content

Historically, this method has always disposed the response content if it was
throwing an exception. The reason documented in the comment really doesn't
make much sense, especially to just dispose the content but not the actual
response object. The developer pattern we advise when getting an HttpResponseMessage
is to wrap it in a 'using' statement or use an explicit .Dispose() call. And
disposing the HttpResponseMessage would always dispose the inner .Content
anyways.

The use case of dotnet/corefx#26684 is that the response content should be available regardless
if this method throws an exception or not. Developers normally don't expect an object
to get disposed (partially in this case) as a side-affect of calling a method on the
object. So, we're changing the behavior to be more consistent generally with other
.NET objects.

Fixes dotnet/corefx#26684

* Address PR feedback


Commit migrated from https://github.com/dotnet/corefx/commit/b0e049cc3db252129a36648780cf78cb0641afbf
2018-05-19 13:01:12 -04:00
Stephen Toub ee5c5b4d31 Fix warning about Brotli in uap System.Net.Http build (dotnet/corefx#29775)
Commit migrated from https://github.com/dotnet/corefx/commit/fdaee74e260ebe3239b3e5c9b80d45ba1f0d650c
2018-05-18 11:59:22 -04:00
David Shulman a6af7cfd24 Fix client certificate lifetime handling in tests (dotnet/corefx#29758)
* Fix client certificate lifetime handling in tests

This was a difficult bug to track down. Our use of importing PFX files into the
tests has problems due to a combination of issues. The summary is that these
issues cause the private key (which is written to a temp file on disk) to get
corrupted/deleted. This is why we would get random errors about "invalid client
credentials" when using client certificates in HttpClient (or SslStream).

Thanks to @bartonjs for helping me work thru this.

The lifetime of the temp file containing the private key is associated with the managed
X509Certificate2 object that is created. However, our use of X509Certificate2Collection
followed by the use of the .Find() API in
[GetEligibleClientCertificate](https://github.com/dotnet/corefx/blob/dotnet/corefx@10aa8277de2521fb1e6a5b42d053ad8cc947be81/src/Common/src/System/Net/Security/CertificateHelper.cs#L55-L59)
causes new managed objects to get created including both a new collection object and
new certificate objects wrapping the existing native PCCERT_CONTEXT of the old managed
certificate object. This causes lifetime issues for the temp file containing the private
key since the old managed objects are GC'd.

In terms of fixing this for the tests, I've optimized the Configuration.Certificates
helper and removed constructs that we don't actually use in our tests. Switching from
using .Import() on the collection object to actually creating the X509Certificate2
object directly helps with managing the lifetime of the certificate.

I will be doing a follow-up PR to optimze GetEligibleClientCertificate() to switch from
using .Find() and instead directly query the certificates in the original collection.
This will result in less managed objects being created as well as avoid additional private
key lifetime issues for certificates imported that use the default X509KeyStorage.DefaultKeySet
flags.

I also fixed a problem with the test which was always failing on NETFX.

Closes dotnet/corefx#9543

* Remove Mutex


Commit migrated from https://github.com/dotnet/corefx/commit/75ba6cd878b6764e1f400c839271866f7d2a049a
2018-05-17 10:46:18 -07:00
Stephen Toub b90fae078b Add more missing overrides to refs (dotnet/corefx#29738)
Ran /t:GenerateReferenceSource and undid irrelevant changes, though I kept a few files where the changes were trivial (e.g. whitespace) and it seemed better to just accept the change to stay in sync with GenerateReferenceSource.

In general I only added missing overrides on non-sealed classes, but when there were already overrides included on sealed classes, I added them back for consistency.

Commit migrated from https://github.com/dotnet/corefx/commit/10aa8277de2521fb1e6a5b42d053ad8cc947be81
2018-05-16 22:11:33 -04:00
Stephen Toub 707aceaacc Add Brotli support to SocketsHttpHandler (dotnet/corefx#29729)
* Add Brotli support to SocketsHttpHandler

- Add DecompressionMethods.Brotli
- Add support for Brotli to SocketsHttpHandler
- Add some tests

* Address PR feedback


Commit migrated from https://github.com/dotnet/corefx/commit/91f2cd7e3de0c4eab799e4d946b1d50c4d15d930
2018-05-16 21:40:53 -04:00
David Shulman bfad67798e Disable test on NETFX (dotnet/corefx#29743)
This newly added test was always failing in NETFX (Outerloop).

.NET Framework has always had a limitation and cannot resolve DNS names with Unicode since it is p/invoking into the 'A' and not 'W' version of the native APIs. The workaround for developers is to use punnyname for the DNS name.

This is currently being tracked with internal bug 125570.

Commit migrated from https://github.com/dotnet/corefx/commit/8ab4f2c1b3bddf79ea3d206a0fec8444f0af167a
2018-05-16 12:18:52 -07:00
David Shulman 2ae1d2c874 Update System.Net tests to use newer corefx-testdata PFX files (dotnet/corefx#29724)
Updated PFX files were checked into corefx-testdata repro via
https://github.com/dotnet/corefx-testdata/pull/24. This PR removed
the friendly name attribute from the private key. This fixes the
problem in Windows dealing with parallel PFX import.

This PR updates the System.Net.* tests to use the updated corefx-testdata package.

Closes dotnet/corefx#23341
Contributes to dotnet/corefx#9543

Commit migrated from https://github.com/dotnet/corefx/commit/84883052ef0f720a8befdc8525db50c9544227d5
2018-05-16 11:42:46 -07:00
Caesar Chen a13f0cb9bd Fix a test and add a argument check for DiagnosticsHandler (dotnet/corefx#29701)
* fix test and add a check for DiagnosticsHandler

* address feedback

* improve comment


Commit migrated from https://github.com/dotnet/corefx/commit/cda3d63089ec3e1e4d51d635da444b7319b98440
2018-05-15 10:47:07 -07:00
Stephen Toub 25edfafe0e Fix TaskContinuationOptions => TaskCreationOptions in test (dotnet/corefx#29667)
Commit migrated from https://github.com/dotnet/corefx/commit/1b5782d29d18f96c20d26e5c8f2844f5d082c887
2018-05-11 18:44:31 -04:00
Stephen Toub f3656cb566 Use shared StringBuilderCache (dotnet/corefx#29657)
Commit migrated from https://github.com/dotnet/corefx/commit/03df812785e99885efde06a0f88d82578955276e
2018-05-11 17:39:06 -04:00
Max Kerr 27e33e05c0 Minor improvements to SocketsHttpHandler redirect logging (dotnet/corefx#29584)
* Minor additions to redirect logging.

* Fix logging of original request method.

* Whitespace

* Update to use the HandlerMessage format.


Commit migrated from https://github.com/dotnet/corefx/commit/fe3df48064dfe35d19b8ff98dfb4eac4f606eaf2
2018-05-10 14:29:08 -07:00
David Shulman fe2ca7b7ae Add missing ConfigureAwait(false) to UAP HttpClientHandler (dotnet/corefx#29553)
Fixes dotnet/corefx#29517

Commit migrated from https://github.com/dotnet/corefx/commit/0f3814b1c002efd94f7a81f57f8c48f2022d14be
2018-05-07 15:30:55 -07:00
Max Kerr 5d369ee93a Improve Http authentication logging (dotnet/corefx#29501)
This should help developers debug several common scenarios:

- Pre-authentication credentials rejected
- No match between client and server supported schemes
- Missing or invalid digest tokens

It also logs the value of the www-authenticate header received and the scheme selected, which should help detect a large number of errors.

Commit migrated from https://github.com/dotnet/corefx/commit/e160ef76df64a2114addf774a05af2f995f18bca
2018-05-07 14:20:50 -07:00
David Shulman 264474f8a3 Removed duplicated type HttpVersionInternal (dotnet/corefx#29545)
Removed duplicated type HttpVersionInternal

We added HttpVersionInternal back when it differed from the System.Net.Primitives HttpVersion type. But now that the two types are the same, we can remove the duplicated internal type.

Fixes dotnet/corefx#26492


Commit migrated from https://github.com/dotnet/corefx/commit/40faa4ed5c699e84afbb78f6ff96feb7b99db320
2018-05-07 14:00:19 -07:00
Stephen Toub c8e7b2312b Add missing awaits to XmlTextReaderImplAsync (dotnet/corefx#29518)
* Comment on awaits that don't need ConfigureAwait(false)

- Add comments to several awaits on tasks where ConfigureAwait is unnecessary for a variety of reasons
- Rather than commenting, change one await to GetAwaiter().GetResult() where we know the task is already completed (rather than just commenting to that effect)

* Add missing awaits to XmlTextReaderImplAsync


Commit migrated from https://github.com/dotnet/corefx/commit/b758c3b1f1293ada2e46f9e221be0b392838cc41
2018-05-04 16:08:59 -04:00
Caesar Chen f902f3ef5f Unify setting null CookieContainer behavior on HttpClientHandler (dotnet/corefx#29337)
* unify set null CookieContainer behavior

* address test issue, and address feedback

* disable a test


Commit migrated from https://github.com/dotnet/corefx/commit/e30a7494292f3e6e66c0d152ad3240fa1f6dc766
2018-05-03 14:32:32 -07:00
Caesar Chen b2d22149da miscellaneous fix (dotnet/corefx#29492)
Commit migrated from https://github.com/dotnet/corefx/commit/38ad17100349ef286edeb67ddffe4c44ba4e51e1
2018-05-03 14:31:45 -07:00
Stephen Toub 7580bf003a Delete Brotli_External_DecompressesResponse_Success test (dotnet/corefx#29486)
We have Brotli_DecompressesResponse_Success which just uses a loopback server.  I'd added Brotli_External_DecompressesResponse_Success as a way to test against another Brotli implementation, but that's not really something we need to do in the System.Net.Http tests; rather, it's up to the System.IO.Compression.Brotli tests to ensure compliance.  Given that, and this tests ends up causing failures when httpbin.org goes down, I'm just deleting it.

Commit migrated from https://github.com/dotnet/corefx/commit/e85573f9b778ba65925f17da6fc485bb43d2c055
2018-05-03 15:01:39 -04:00
Stephen Toub b9397a45ca Add two missing ConfigureAwait(false) calls in SocketsHttpHandler (dotnet/corefx#29465)
* Add two missing ConfigureAwait(false) calls in SocketsHttpHandler

ChunkedTransferEncodingReadStream's ReadAsync had one await missing a ConfigureAwait(false).  If there's a synchronization context set on the calling thread, this results in a continuation being created that posts back to that context, which can cause problems (e.g. deadlocks) if that context is blocked, e.g. if the synchronous Read method is being used to block waiting for ReadAsync to complete.  The fix is simply to add `.ConfigureAwait(false)`.

As long as I was fixing that, I also reviewed all `await`s in SocketsHttpHandler and found one more that was missing `.ConfigureAwait(false)`, in HttpConnectionPool's EstablishProxyTunnel, and so fixed that, too.

And added some tests.

* Refactor ContentMode support in tests


Commit migrated from https://github.com/dotnet/corefx/commit/9e8c200f0888a1db590da8ffa026aa7384771611
2018-05-02 19:24:56 -07:00
Marco Rossignoli 4110b40d54 Replace files with CoreLib mirror (<30% differences) (dotnet/corefx#29433)
* remove duplicates

* remove unused Interop.GetFullPathNameW.cs

* revert TupleExtensions.cs for netfx incompatibility

* replace coreclr merged

* replace constants conflicts


Commit migrated from https://github.com/dotnet/corefx/commit/5168f541d4def7c54e490a685ff5dc0e3f90e91a
2018-05-02 06:51:46 -07:00
Dan Friedman 33591df321 Clean dead code System.Net* (dotnet/corefx#29302)
* Clean dead code in System.Net

* More cleaning

* Clean dead code for HttpListener

* Clean dead code for Mail

* Clean dead code in Http

* Clean dead code for NetworkInformation

* Clean more dead code

* Various fixes

* Build fix

* Restore field

* var -> string


Commit migrated from https://github.com/dotnet/corefx/commit/71cc1ae8ba02b7b71878cb69a50c667c8ed0f50f
2018-05-01 16:49:12 -07:00
Stephen Toub e065edbe62 Re-enable the SocketsHttpHandler microbenchmarks (dotnet/corefx#29317)
The perf tests were wholesale disabled due to port exhaustion errors.  Those errors are just coming from the "connectionPerRequest" tests, which are inherently flawed in this regard, so I've just deleted them.

Commit migrated from https://github.com/dotnet/corefx/commit/d3b3d2daafe135684f7d77438dfe7d42f4f4baf8
2018-04-26 17:10:53 -07:00
Eric St. John 8fcddacb0e Update for new API compat operand names
Commit migrated from https://github.com/dotnet/corefx/commit/a9f347950a1526b28f4577f2dbf94c23b3123d5c
2018-04-25 14:26:00 -07:00
José Rivero 06e5d2213a Disabling benchmark due to issue dotnet/corefx#29308 (dotnet/corefx#29309)
- Increasing the timeout on perf.groovy
  (Running profile and diagnostic runs takes over the default of 4 hours.)

Commit migrated from https://github.com/dotnet/corefx/commit/e4e6873b04470e78a9fc0138815b86d364edfa58
2018-04-24 18:24:58 -07:00
Marco Rossignoli 87da9705a6 De-duplicate resource ID's to make Mono merge easier (dotnet/corefx#29280)
* wip

* wip

* wip

* fix System.Linq.Expressions

* revert for tests

* add powershell script

* address PR feedback

* address PR feedbacl

* address PR feedback


Commit migrated from https://github.com/dotnet/corefx/commit/5a37188238e90d8566e6161b43ac483a671bb7d2
2018-04-24 13:58:42 -07:00
Stephen Toub d68f723498 Always use DnsEndPoint in SocketHttpHandler's ConnectAsync (dotnet/corefx#29286)
We had a minor optimization here, but there's a long-standing issue with Socket.ConnectAsync where it's leaving for finalization a socket when the connect with an IP address fails.  It's more important to address that issue, and using DnsEndPoint does so (it's also the code we want, anyway).

Commit migrated from https://github.com/dotnet/corefx/commit/b399fe53343295ccf475262552b6d36beafb2b4e
2018-04-23 17:41:54 -07:00
Stephen Toub d5ba24bff1 Several Http test fixes to hopefully improve test reliability (dotnet/corefx#29238)
- Add “Connection: close\r\n” response header in more cases where the loopback server explicitly closes a connection, and in particular where the client makes multiple connections.
- Change several Task.WaitAlls on paired tasks to instead use our WhenAllOrAnyFailed helper.

Commit migrated from https://github.com/dotnet/corefx/commit/cebcf436358600a4808656b142a74f57d1e8f6f0
2018-04-20 18:21:18 -04:00
Paulo Janotti c3a6cbaea6 More SSL error queue cleaning (dotnet/corefx#29171)
* Cleaning up more instances leaving errors on SSL queue

* Fixes dotnet/corefx#25676

Commit migrated from https://github.com/dotnet/corefx/commit/c0083e09903f3d1aa23598beeae5aafbdd433f1f
2018-04-18 08:52:53 -07:00