Commit Graph
1196 Commits
Author SHA1 Message Date
Nick Schonning 53b0062880 typo: Double word "this" (dotnet/corefx#36273)
Commit migrated from https://github.com/dotnet/corefx/commit/97e6256f05945f7b20025e5c14cae6a8871c87ef
2019-03-24 13:40:35 -07:00
Nick Schonning c4db72fc2e typo: Double word "the" (dotnet/corefx#36274)
* typo: Double word "the"

* Apply suggestions from code review

Co-Authored-By: nschonni <[email protected]>


Commit migrated from https://github.com/dotnet/corefx/commit/aa67d40064f652b48f7ee0cd85dbfe39c7deebac
2019-03-24 13:40:10 -07:00
Max Kerr e63ec91ded Add additional diagnostics to PostAsync_RedirectWith307_LargePayload (dotnet/corefx#36239)
* Add additional diagnostics.

* Remove redundant check.


Commit migrated from https://github.com/dotnet/corefx/commit/eca5e9b5399475750d0562752428885220a3c927
2019-03-22 17:56:14 -04:00
Liudmila Molkova 345e589943 Ignore invalid correlation context tokens in Http Diagnostics Listener (dotnet/corefx#35906)
* Fix 31687: ignore invalid correlation context tokens

* add comments

* Add outerloop category

* url-encode correlation context keys and values


Commit migrated from https://github.com/dotnet/corefx/commit/fcbd6804cee9ededfb9db50d7540749640137952
2019-03-21 10:50:50 -07:00
Adam Sitnik 4bf4932b00 Merge remote-tracking branch 'upstream/master' into removePerfTests
Commit migrated from https://github.com/dotnet/corefx/commit/48478bb1ae934e0a4949c71a13ddc7724eef7455
2019-03-19 16:46:37 +01:00
Nikita Potapenko 28f63d6f4e Fix typo (dotnet/corefx#36107)
.Net -> .NET

Commit migrated from https://github.com/dotnet/corefx/commit/d29ae79fb13b4df9078400ac49b460e011f96404
2019-03-17 15:43:21 -07:00
Caesar Chen 52de487b17 Http trailer support for HTTP/1.x (dotnet/corefx#35337)
* http trailer for http/1.1

* address feedback

* address feedback

* pr feedback

* stop blocking context

* fix framework test failiure

* address feedback

* seperate tests

* address some feedback

* more feedback from review

* correct ReadAsync

* feedback from review

* handle short ReadAsync()

* more feedback


Commit migrated from https://github.com/dotnet/corefx/commit/ac9c746c44a5c0decf551fe33fb2acbdc895d021
2019-03-16 15:56:39 -04:00
David Shulman 94d443763c Disable some proxy tests (dotnet/corefx#36037)
Disable some problematic proxy related tests.

Contributes to issue dotnet/corefx#32809

Commit migrated from https://github.com/dotnet/corefx/commit/b97e1b696cb9bf6bf288b4fd28481a2026b0dd7a
2019-03-14 09:48:55 -04:00
David Shulman dd2c47fc44 Clean up some tests and move to new Azure endpoint (dotnet/corefx#36018)
This PR changes the Azure test endpoint for HTTP/1.1 and WebSocket tests to use
Azure App Service instead of the classic Azure Cloud Service endpoint. This now
matches the HTTP/2.0 endpoint architecture.

We are deprecating the use of Azure Cloud Service endpoints because they are hard
to deploy and maintain. Azure App Service, on the other hand, provides a lot of benefits
including built in production/staging slots, TLS certificate handling and easier
integration with Azure DevOps deployment models.

There are a few downsides to Azure App Service which are known feature limitations.
Since it uses ARR (reverse proxy), it causes websocket connections to be proxied.
This results in some behavior changes for some edge condition tests we have. For example,
when a websocket handshake fails (due to subprotocol mismatch for example), the client
side doesn't see a TCP disconnect. Instead, due to the reverse proxy, we end up getting
an HTTP status code (like 500). Either way, it is a websocket handshake failure. So, I've
updated a few tests to be less brittle for that. I also opened another issue dotnet/corefx#36016 to
track moving a few websocket tests to the loopback websocket server which doesn't yet
have full capability.

I also converted an HTTP statusline test to use the loopback server.

Commit migrated from https://github.com/dotnet/corefx/commit/689e58ec123d8c730d48d1c35c8f7ecbba6c22cf
2019-03-13 20:57:55 -07:00
Stephen Toub 440cb8cf44 Disable tests failing on WSL (dotnet/corefx#36017)
This is on Windows 10 Version 10.0.17763 Build 17763.

Commit migrated from https://github.com/dotnet/corefx/commit/cf5c3b0282c07ab13da79f04ee83d39f20bac431
2019-03-13 21:09:42 -04:00
Liudmila Molkova 8f347c6f90 Inject W3C headers in HTTP diagnostics handler (dotnet/corefx#35882)
* Inject W3C headers in corefx Htpp Diagnostics HAndler

* Inject W3C headers if activity format is W3C

* fix style and indentation

* review: fix issue


Commit migrated from https://github.com/dotnet/corefx/commit/7314001fd1ebfb25b500774d1551170a17c7a209
2019-03-11 15:15:08 -07:00
Adam Sitnik 7f1ccc4507 remove System.Net.Http.PerformanceTests
Commit migrated from https://github.com/dotnet/corefx/commit/4dee2229eae448d0ba024340448d6acdf93c9d31
2019-03-05 07:33:28 +01:00
Viktor Hofer f8a8530d0f Project msbuild syntax cleanup (dotnet/corefx#35686)
* Remove license header from non-shipping files

* Remove obsolete Project attributes

* Remove xml header and remove DefaultTargets


Commit migrated from https://github.com/dotnet/corefx/commit/c390ce7df50252e11f5d322276e9d19e046d1332
2019-03-03 18:55:25 +01:00
Geoff Kizer 8aab5832e0 Merge pull request dotnet/corefx#35623 from MarcoRossignoli/fixuseragentparsing
Fix bug: UserAgent malformed parsing

Commit migrated from https://github.com/dotnet/corefx/commit/cb54ad963cc655d4c783033a2ab3dc3576d0dc65
2019-03-01 15:40:58 -08:00
Marco Rossignoli 357812cea2 continue parsing after nested call
Commit migrated from https://github.com/dotnet/corefx/commit/b2865f5e4dcda0a3745b96d704aebec82ab22d60
2019-03-01 23:11:29 +01:00
Marco Rossignoli 68952502ce add some tests
Commit migrated from https://github.com/dotnet/corefx/commit/12fc04b6f8c20d901f9c89a1b8d8a540fa22dd0d
2019-02-28 16:13:24 +01:00
Marco Rossignoli 2f1d983a55 fix UserAgent parsing
Commit migrated from https://github.com/dotnet/corefx/commit/840d29c05243f5afe31e43e2415d6dce5b3c71fd
2019-02-27 12:00:17 +01:00
Tomas Weinfurt a41f64dab6 enable GetAsync_AllowedSSLVersion_Succeeds for SocketHttpHandler (dotnet/corefx#35605)
* enable GetAsync_AllowedSSLVersion_Succeeds for SocketHttpHandler and skip Curl on RH6


Commit migrated from https://github.com/dotnet/corefx/commit/f44142b855330ca9274827a230b8ad9a3ccda357
2019-02-26 22:41:05 -08:00
Tomas Weinfurt 19fc9cb9ed improve Ssl3 detection (dotnet/corefx#35574)
* improve sslv3 detection

* updates to pass all tests

* correct catch


Commit migrated from https://github.com/dotnet/corefx/commit/0fa22d4b6753c47b6139980255e932341353179e
2019-02-25 23:02:20 -08:00
Geoff Kizer 294a0381c5 add StreamState and rework HTTP2 stream state handling
cleanup


Commit migrated from https://github.com/dotnet/corefx/commit/1eba83637d47fde09c8e1748b0ebb4ca42da5ca4
2019-02-21 03:59:36 -08:00
David Shulman 6167d604af Fix Negotiate/SPNEGO Kerberos to NTLM fallback on Linux (dotnet/corefx#35383)
This PR adds support to our Linux gssapi layer so that we properly handle the Negotiate
protocol (SPNEGO) being able to to fall back from Kerberos to NTLM.

Windows Negotiate SSPI implements the SPNEGO protocol. However, it has built-in error
handling for dealing with quick fallback from Kerberos to NTLM in error cases such as where
the client is not on a domain/Kerberos realm, the client is using a local credential, the
client is talking to a non-domain server, etc.

However, the Linux implementation of SPNEGO doesn't handle those error cases very well.
So, I added the proper retry logic when generating the initial context token. Now, we will
be able to fall back from SPNEGO-wrapped Kerberos to SPNEGO-wrapped NTLM protocol blobs.

A similar bug exists in libcurl which is why Curl and CurlHandler are unable to connect to
Negotiate servers when not part of the Kerberos realm. I am considering proposing my fixes
to the libcurl repo as well.

I added more tests to support this PR and did manual testing. I added some additional
EventSource tracing as well.

Contributes to dotnet/corefx#34878


Commit migrated from https://github.com/dotnet/corefx/commit/1fd3ba126538c2fed76d2279db26dc7ba5ceed41
2019-02-19 09:14:44 -08:00
Stephen Toub a7cd5b22b1 Address PR feedback and additional cleanup
Commit migrated from https://github.com/dotnet/corefx/commit/c0f24cf4136f22e508e1b9289062e541bad6af88
2019-02-15 15:39:49 -05:00
Stephen Toub 1bd66ccdd9 Remove uap config from System.Net.Http UnitTests
These tests are compiling in internal sources and running tests against them directly.  The only configuration we need is netcoreapp.


Commit migrated from https://github.com/dotnet/corefx/commit/f9d1057321c17d8692e829b311c925660e23f8db
2019-02-15 13:05:31 -05:00
Stephen Toub 2aa4ad5d3a Use StaticTable for writing known headers
Commit migrated from https://github.com/dotnet/corefx/commit/65a101d6968bac28f343ed2e352cf54f8e122f21
2019-02-15 13:05:30 -05:00
David Shulman 819f9791e4 Add simple http Windows auth tests using loopback server (dotnet/corefx#35280)
I added this test to help get familiar with the new GenericLoopbackServer
test pattern as well as use the new SkipTestException() ability.

The test is not an end-to-end test. It simply validates that the client is able
to begin the multi-leg Windows auth handshake and send the initial Authorization
header.

In addition, once https://github.com/dotnet/core-eng/issues/5135 is completed,
the 'IsNtlmInstalled' condition will always be true for the CI machines. Thus,
we will get better test coverage for Windows auth scenarios.

Contributes to dotnet/corefx#34878

Commit migrated from https://github.com/dotnet/corefx/commit/48bcedf786f264aa15adcb55b161ecc0cb2b2172
2019-02-12 21:12:03 -05:00
Geoff Kizer c88fd24fd9 Merge pull request dotnet/corefx#34345 from geoffkizer/genericloopbackserver
Add GenericLoopbackServer for HttpClient testing

Commit migrated from https://github.com/dotnet/corefx/commit/3de6ad8c1233ccf9c781d42a0cdb88b0aeb24cb7
2019-02-12 12:54:50 -08:00
Tomas Weinfurt c5aa04cff7 enable SendAsync_RequestVersion20_ResponseVersion20IfHttp2Supported on Unix (dotnet/corefx#35201)
* enable SendAsync_RequestVersion20_ResponseVersion20IfHttp2Supported on Unix

* use IsWinHttpHandler to skip platform test on older windows

* reorder using statement


Commit migrated from https://github.com/dotnet/corefx/commit/caba0ef9ea05f66aaae814e89848acc98c23f327
2019-02-12 11:45:13 -08:00
Geoff Kizer 2cf7954e1a fix netfx build
Commit migrated from https://github.com/dotnet/corefx/commit/0919bf7fde56a88f8cb2598d3b3709e6a75d279d
2019-02-12 04:00:04 -08:00
David Shulman 327b35cd6d Fix HttpClient EKU tests (dotnet/corefx#35240)
A set of HttpClient tests related to ClientCertificates were always failing on my machine:

System.Net.Http.Functional.Tests.SocketsHttpHandler_HttpClientHandler_ClientCertificates_Test
* method="Manual_SendClientCertificateWithClientAuthEKUToRemoteServer_OK"
* method="Manual_SendClientCertificateWithNoEKUToRemoteServer_OK"
* method="Manual_SendClientCertificateWithServerAuthEKUToRemoteServer_Forbidden"

These tests would generate an exception:
>System.Net.Http.HttpRequestException: An error occurred while sending the request. --->
 System.IO.IOException: The remote party requested renegotiation when AllowRenegotiation was set to false.

Similar to the tests failing and fixed in PR dotnet/corefx#35225, the CI machines don't have the test
root certificate installed. So, the tests weren't running in CI and the failures weren't noticed.

The root cause of the test failures is due to using SocketsHttpHandler. It is always setting
`SslStream.AllowRenegotiation` to false when first attempting to connect via HTTP/2. This is fine
if the connection is truely HTTP/2 since HTTP/2 doesn't support TLS renegotiation. However, if the
remote endpoint doesn't support HTTP/2 and thus connects with HTTP/1.1, then the SslStream should
not have AllowRenegotiation set to false. Client certificate scenarios frequently have the server
ask for the client certificate later in the connection process. So, TLS renegotiation is used. Opened
new issue dotnet/corefx#35239 to fix this in SocketsHttpHandler (or SslStream).

As part of fixing these tests, I refactored them into a single Theory test. But I had to workaround
complications due to using RemoteInvoke. I added a new RemoteInvoke overload to handling passing
an additional parameter.

Commit migrated from https://github.com/dotnet/corefx/commit/0c2ccd172157e0ebf1957e1bbcd5f07786ad6e3d
2019-02-11 17:27:04 -08:00
David Shulman d609d95d6b Disable AuthProxy__ValidCreds_ProxySendsRequestToServer test on Nano (dotnet/corefx#35221)
The System.Net.Http AuthProxy__ValidCreds_ProxySendsRequestToServer test is
frequently failing on Nano.  It is highly likely a test bug and not a product bug.

Contributes to dotnet/corefx#32809

Commit migrated from https://github.com/dotnet/corefx/commit/d0ddc1c8202f1c9e2b9913a533c3aba3202d1f65
2019-02-10 14:32:31 -08:00
David Shulman 8ddab057fd Add NTLM feature detection and more tests (dotnet/corefx#35200)
This PR works toward the goal of our Enterprise Scenarios. I added logic in the Unix
PAL gssapi layer to detect whether the NTLM plugin is installed. This is useful both
in the product code (to return better exception messages) and the test code (to
skip NTLM tests if needed).

Refactored some of the Common System.Net.Configuration logic for tests. Added new
environment variable logic to separate between domain-joined and standalone server
environments.

Add new tests to validate NTLM end-to-end connectivity. Opened some new issues
discovered along with way regarding HTTP/2 and Windows authentication.

To run these new tests simply set the 3 environment variables to point to the
standalone windows server environment.  For example, on Linux:

```
export COREFX_WINDOWSSERVER_HTTPHOST=somewindowsmachine.contoso.com
export COREFX_NET_SERVER_USERNAME=someusername
export COREFX_NET_SERVER_PASSWORD=somepassword
```

I have already deployed a standalone Windows server for these tests but
we're not ready yet to have the tests always run in CI.

Contributes to dotnet/corefx#34878 


Commit migrated from https://github.com/dotnet/corefx/commit/fe6f55b496489dbd02cdd207c0b1f9112b560763
2019-02-10 08:24:06 -08:00
Geoff Kizer 20be2ff6d4 rename HttpCookieProtocolTests => HttpClientHandlerTest.Cookies
Commit migrated from https://github.com/dotnet/corefx/commit/47e35192ff1f830b27e2ed5fa14d7d7645a27e95
2019-02-07 17:06:48 -08:00
Geoff Kizer 71d702c934 add GenericLoopbackServer and provide basic implementations for HTTP/1.1 and HTTP/2, and use in Cookie tests
Commit migrated from https://github.com/dotnet/corefx/commit/4fc6a75fce36fbbf7b551f25c121dde403b8f0f4
2019-02-07 16:55:26 -08:00
Geoff Kizer 7ad045743f Merge pull request dotnet/corefx#34630 from geoffkizer/http2tests
HTTP2: Modify HTTP2 tests to run against platform handlers as well

Commit migrated from https://github.com/dotnet/corefx/commit/073bf4793f49e46f3a07e865b82045724ccc3641
2019-02-07 16:21:04 -08:00
Krzysztof Wicher 3ed51b67e9 Fix casing of files to get closer to ./build.sh -allConfiguration working on linux (dotnet/corefx#35085)
* Rename directories to use CamelCasing

* Fix CsProj files to match file names and their casing

* fix couple of Compile items which were not in csproj file


Commit migrated from https://github.com/dotnet/corefx/commit/8c5260061b11323dfd97fbab614d54402405513f
2019-02-07 10:41:44 -08:00
Geoff Kizer 34ca14c059 fix merge issues and some test cleanup
Commit migrated from https://github.com/dotnet/corefx/commit/340d2ac71afcbb6f9ea220e7549fcf8247995678
2019-02-06 14:02:20 -08:00
Geoff Kizer 43e41e9328 add basic GOAWAY tests and connection shutdown handling
Commit migrated from https://github.com/dotnet/corefx/commit/449a47ba2c6dbb568692d554787405dde7d14d8e
2019-02-06 14:01:45 -08:00
Geoff Kizer 741e216371 test fixes for various handlers and some additional tests
Commit migrated from https://github.com/dotnet/corefx/commit/d1c85401a2d9d727e4f87dab62277d569cbc09c5
2019-02-06 14:01:45 -08:00
Geoff Kizer 0714534ab3 make HTTP2 tests run for platform handler as well
Commit migrated from https://github.com/dotnet/corefx/commit/686bf6eb6973713f4845fbb874b53f81ea16e50b
2019-02-06 10:48:22 -08:00
Caesar Chen d6e31afb2d Diable System.Net.Http.FunctionalTests parallel execution on UAP run (dotnet/corefx#35004)
* diable parallel execution

* fix format....

* address feedback


Commit migrated from https://github.com/dotnet/corefx/commit/5543097d8b6039dedffdcd8b8e713de38e5a1ece
2019-01-31 15:55:40 -08:00
Max Kerr b06f237191 Improve handling of HTTP/2 frames received on closed stream (dotnet/corefx#34629)
* Basic support for GoAway frames.

* Review feedback.

* Remove go-away frame handling, add testing to ensure that the loopback server closes the connection instead.

* Remove comma.

* Change error code to reflect the actual failure mode.

* Correct swapped error codes.


Commit migrated from https://github.com/dotnet/corefx/commit/47f6404357832466585f06d5c9ee07ed2f7a27a4
2019-01-30 13:40:28 -08:00
Tomas Weinfurt b1ca45db6d fixes for ARM32 (dotnet/corefx#34559)
* arm fixes

* use PassingTestTimeoutMilliseconds instead of hardcoded number


Commit migrated from https://github.com/dotnet/corefx/commit/4eccf3ff4e87831de660e6a23b3ba24d55f7bca1
2019-01-18 10:47:52 -05:00
Caesar Chen 81f8344e17 Fix CVE-2019-0545: .NET Core Information Disclosure Vulnerability (.NET Core 3.0) (dotnet/corefx#34507)
* fix 100-continue issues

* address feedback


Commit migrated from https://github.com/dotnet/corefx/commit/04b237b2f91ae4b4bb709fa60b51fa6ad7f4bc97
2019-01-11 14:34:02 -08:00
Geoff Kizer 1329b56e06 fix UWP test
Commit migrated from https://github.com/dotnet/corefx/commit/3fb6dd4a0298f61a1a896a0d29e117d8ee95af0f
2019-01-09 12:49:33 -08:00
Geoff Kizer d33615e499 rename HttpClientTestBase to HttpClientHandlerTestBase
Commit migrated from https://github.com/dotnet/corefx/commit/b26e2a66e5c41c3263caf5fdaa8a1811dd360e33
2019-01-09 02:44:04 -08:00
Geoff Kizer 834b812e22 remove handler dependency in HttpClientTest
Commit migrated from https://github.com/dotnet/corefx/commit/93719a61bb57729d940a8f20d7884e06dd935af7
2019-01-09 02:32:23 -08:00
Geoff Kizer b5bea157d6 Merge pull request dotnet/corefx#34347 from geoffkizer/decomptests
consolidate decompression tests

Commit migrated from https://github.com/dotnet/corefx/commit/814775ca14faff98602ad2d33f8f443e1e7dce24
2019-01-04 14:40:30 -08:00
Liudmila Molkova 2ce99327c2 Do not add Request-Id header when its added already (dotnet/corefx#34321)
Commit migrated from https://github.com/dotnet/corefx/commit/fe6e895de1fe78c5e677895a1dcf1f6339561153
2019-01-04 09:00:07 -05:00
Geoff Kizer 6386c5af53 consolidate decompression tests
Commit migrated from https://github.com/dotnet/corefx/commit/474b87aeaa9c0ddfe411d3a5d473a20c35f28622
2019-01-03 17:33:45 -08:00
Geoff Kizer 66c9cd06da split redirect tests into separate file
Commit migrated from https://github.com/dotnet/corefx/commit/33aa830e7975d6fdf50143348cb78f2924d673de
2019-01-01 16:00:52 -08:00