Commit Graph
246 Commits
Author SHA1 Message Date
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
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 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
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
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 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 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
Geoff Kizer 25cd4ea624 remove test calls to EnsureHttp2Feature that are no longer necessary
Commit migrated from https://github.com/dotnet/corefx/commit/79481df38ed168758f4ac6e6fcd4cc5f9cb5611d
2018-12-10 10:31:38 -08:00
David Shulman e03c1b170b Skip some Http auth tests on UAP (dotnet/corefx#32646)
Some Http auth related tests have begun failing all the time on Outerloop UWP runs:

* GetAsync_ServerNeedsBasicAuthAndSetDefaultCredentials_StatusCodeUnauthorized
* GetAsync_CredentialIsNetworkCredentialUriRedirect_StatusCodeUnauthorized

The UAP version of Http stack uses WinRT APIs (which use WinInet). And there is
implicit caching of credentials per-process due to WinInet. So, we need to disable
these tests on UAP similar to other tests in this file.

Contributes to dotnet/corefx#32647

Commit migrated from https://github.com/dotnet/corefx/commit/e7e60c52911705bf38cd3dbbfbc9b726209130e7
2018-10-05 14:21:56 -07:00
Marco Rossignoli eed59da488 Fix HttpClient sending fragment portion of uri on request (dotnet/corefx#32574)
Fixes dotnet/corefx#32378


Commit migrated from https://github.com/dotnet/corefx/commit/87a944afb3e0ec392d5838900b5498e015d5e47b
2018-10-04 09:40:41 -07:00
Santiago Fernandez Madero 5267216c37 Fix assert failing when getting network interfaces (dotnet/corefx#32394)
* Fix assert failing when getting network interfaces

* PR Feedback


Commit migrated from https://github.com/dotnet/corefx/commit/cae2180e1443e1ace51f7498e48fd84d95550358
2018-09-25 18:11:13 -04:00
Dustin Masters 97531f9946 Fix looking up headers on HttpClient response (dotnet/corefx#31550)
Headers marked as `HttpHeaderType.Request` were not able to be accessed
via the `Headers.GetValues` method. When looking up a header,
the `HeaderDescriptor` gets set to to `HttpHeaderType.Custom` in
`GetHeaderDescriptor`, but the persisted header in `_headerStore` had
`HeaderType` set to `HttpHeaderType.Request`, so lookups would fail.
This change makes the insert logic consistent with the lookup logic.

Fixes dotnet/corefx#31143


Commit migrated from https://github.com/dotnet/corefx/commit/8917abaf35ea153f4bbf1098d74d02963ef08e76
2018-08-02 18:16:03 -07:00
David Shulman f10c0336a1 Add test helper to enable SocketsHttpHandler HTTP/2 testing (dotnet/corefx#31530)
The HTTP/2 feature is turned off by default on SocketsHttpHandler since the implementation
is not done. It can be enabled via AppContext or environment variable settings. However,
using those settings is not practical because we need a more granular way of turning on
the HTTP/2 feature for running certain tests.

This PR adds a test helper that uses reflection to set the internal _maxHttpVersion field
of SocketsHttpHandler. I also enabled one HTTP/2 test to demonstrate how to use this test
helper method.

Contributes to dotnet/corefx#31496

Commit migrated from https://github.com/dotnet/corefx/commit/2f9483cdf78c8b6319f471ccb09422a2b0248ee7
2018-08-01 11:49:23 -07:00
David Shulman da166250dc Fix networking tests to work against NETFX (dotnet/corefx#31397)
Several of these tests were disabled because they failed on NETFX. This PR adjusts the tests
to work properly on NETFX due to some differences in behavior from .NET Core.

Fixes dotnet/corefx#28882

Commit migrated from https://github.com/dotnet/corefx/commit/f5a165540c4067b8fe0635b9beb6102d0b1d87a3
2018-07-29 07:57:08 -07:00
Geoff Kizer cda93f3287 address review feedback
Commit migrated from https://github.com/dotnet/corefx/commit/04928d2ddedc8e9f62345b8725870f86a559e862
2018-07-17 11:52:36 -07:00
Geoff Kizer f7a4f23f7e rework request header framing and several other fixes
cleanup


Commit migrated from https://github.com/dotnet/corefx/commit/3134237aafbc598e69b23be29e3442ebe9795e70
2018-07-17 11:52:33 -07:00
David Shulman 94a3168144 Fix HttpWebRequest when using system proxy settings (dotnet/corefx#31100)
While investigating other HttpClient/HttpWebRequest proxy-related bugs, I discovered that
HttpWebRequest was not honoring system proxy settings as defined on Windows with IE
settings or on Linux using environment variables.

The problem is due to how HttpClient and HttpWebRequest differ in how they represent
the default behavior of using system proxy settings with the various properties. Fixed
HttpWebRequest so that it will translate the system proxy settings to the internal
HttpClient/HttpClientHandler objects.

I also removed an invalid Assert in HttpConnection. This assert was firing when using a proxy
that was defined on the loopback adapter using IPv6 literal "[::1]".  Due to issue dotnet/corefx#28863 with Uri,
the Uri.IdnHost property doesn't have the brackets for IPv6 literals. So, the Assert was
occuring.

I did not add any new CI tests because it is currently not possible to test system proxy settings
in CI since it involves changing machine configuration. But I ran manual tests.


Commit migrated from https://github.com/dotnet/corefx/commit/72119235e294e711871cf453f2ffc66ba17ff23b
2018-07-16 19:51:03 -07:00
Santiago Fernandez Madero ccdea37829 Update netfx alias to target .NET 4.7.2 (dotnet/corefx#28883)
* Change netfx to target .NET 4.7.1

* Fix CoreFx.Private.TestUtilities to not reference System.Runtime.InteropServices.RuntimeInformation which is now inbox in netfx

* Fix StackTrace.Tests to be built against netstandard and run against netfx inbox

* Fix ValueTuple configurations to support net461 and add netfx placeholder configuration since in net471 it is now inbox

* Fix projects' package configurations that had netfx (net461) to still support net461 and netfx as a buildconfigurations

* Disable failing tests when running on .NET 4.7.1

* Make netfx target net472 and merge with master

* Update ActiveIssue comments to issue number only

* Workaround packages tests due to not installed targeting pack

* Match NSSupportPackage version to CLI's

* Remove netstandard support lib bin placing to runtime and testhost for netfx, fix reference paths to match new package

* Run UpdateVSConfigurations after merging conflicts with the newly updated SDK projects

* Add net461 package configuration to System.CodeDom

* Add net461 package configuration to System.Configuration.ConfigurationManager

* Add net461 package configuration to System.Security.Cryptography.Xml

* Add net461 package configuration to System.Security.Permissions

* Add net461 package configuration to System.ServiceModel.Syndication


Commit migrated from https://github.com/dotnet/corefx/commit/faad2e63b35bed10fe18195987a413308b97eded
2018-07-10 15:04:27 -07:00
Max Kerr 42e3d11321 Add support and tests for HTTP 308 Permanent Redirect (dotnet/corefx#30398)
This change adds support for 308 redirects to SocketsHttpHandler, and enables 308 redirects in our tests.

Fixes: dotnet/corefx#30389


Commit migrated from https://github.com/dotnet/corefx/commit/12e41edba6c9b177f21e30001ce3c890c5225132
2018-07-10 10:18:56 -07:00
Stephen Toub 4c9eb2ec25 Simplify built-in types across corefx tests (dotnet/corefx#30660)
Commit migrated from https://github.com/dotnet/corefx/commit/7ae1a252d7e68c5513d2658de7a401c37e9b0504
2018-06-25 22:42:04 -07:00
David Shulman e813e968b6 Fix SocketsHttpHandler for Windows auth proxy CONNECT tunneling (dotnet/corefx#30478)
SocketsHttpHandler wasn't even trying to send Negotiate/NTLM auth tokens to a proxy. This was due
to some invalid logic regarding the "usingProxy" field in HttpConnection. Reworked this logic to
be clearer about the various kinds of proxy scenarios.

I refactored the loopback proxy server and made it much more robust. It can now handle multiple
requests and multiple connections which helps test against the other handlers whose behavior is
different in this area. I plan to do further work in consolidating the LoopbackServer and
LoopbackProxyServer classes in future PRs.

I created a separate HttpClientHandlerTest.Proxy.cs file and moved many existing proxy tests and
added new tests. The current HttpClientHandlerTest.cs file is still over 3000 lines and needs more
refactoring to make it easier to maintain and track test scenario coverage.

Fixes dotnet/corefx#30330


Commit migrated from https://github.com/dotnet/corefx/commit/ec1671fd7feffe1070a94d9d86379e0dd95ddcdf
2018-06-18 16:21:44 -07: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
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
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 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
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
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 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
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
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
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
Marco Rossignoli 20e05bb5cd Pass Uri.IdnHost to WinHttpConnect (dotnet/corefx#28849)
* pass IdnHost

* add manual functional test

* cleanup

* fix comment

* address PR feedback

* address PR feedback

* address PR feedback

* address PR feedback

* address PR feedback

* address PR feedback

* address PR feedback

* fix IPv6 IdnHost

* address PR feedback


Commit migrated from https://github.com/dotnet/corefx/commit/b2893f07cf61dae81d424dd676a0d903a36a10c2
2018-04-17 09:55:34 -07:00
Caesar Chen 7669319f3f SocketsHttpHandler: Add workaround for ipv6 LLA address (dotnet/corefx#28971)
* add workaround for ipv6 LLA address

* address comment

* fix comment


Commit migrated from https://github.com/dotnet/corefx/commit/0698997390ddc15abb375eba73a5d712ccdb8266
2018-04-13 17:34:32 -07:00
Caesar Chen 3aab539b89 Fix proxied ipv6 address request formatting and fix port handling for proxied IP address on SocketsHttpHandler (dotnet/corefx#28740)
* fix proxied ipv6 address request format and fix port handling for ip address

* address feedback

* change naming for test data


Commit migrated from https://github.com/dotnet/corefx/commit/18d685f3b1ed8fd22601fb0bce3eb928f1c4206f
2018-04-05 15:17:20 -07:00
Paulo Janotti 9365b6fb44 Re-enable PostAsync_RedirectWith307_LargePayload dotnet/corefx#23768 (dotnet/corefx#28828)
Fixes dotnet/corefx#23768

Commit migrated from https://github.com/dotnet/corefx/commit/28dcece5c5e7d30446ae90e027076722513b716f
2018-04-04 16:54:06 -07:00
Caesar Chen 109d0485aa disable test (dotnet/corefx#28789)
Commit migrated from https://github.com/dotnet/corefx/commit/e4521cbd572764f3a140366cce7b39402e1a14cc
2018-04-03 16:49:01 -07:00
Caesar Chen 0ffc020ac5 Fix ipv6 address format in Host header (dotnet/corefx#28578)
* fix ipv6 format in host header

* address feedback

* address feedback

* fix common case

* reduce allocation

* address feedback

* fix indexof issue

* disable on curlhandler

* revert to simple fix

* address feedback and add comment

* address test issue, enable on curlhandler

* fix framework failure

* address feedback


Commit migrated from https://github.com/dotnet/corefx/commit/24889e293731f12b11f1205b641cd3e6cb3a3b90
2018-04-02 11:26:29 -07:00
Paulo Janotti c79012a5e5 CurlHandler is deadlocking like WinHttpHandler (dotnet/corefx#28587)
* CurlHandler is deadlocking like WinHttpHandler

This repros consistently for Release on High Sierra. Issue dotnet/corefx#27746 already tracks it.

* Adding a comment to clarify scope


Commit migrated from https://github.com/dotnet/corefx/commit/50d4e1ce620f26ec4aebe26c121a769fc8e724ab
2018-03-28 23:29:23 -07:00
Stephen Toub a6932f9f28 Ensure SocketsHttpHandler throws TaskCanceledExceptions instead of OperationCanceledExceptions (dotnet/corefx#28075)
To increase compatibility, as other handlers often throw the derived type instead of the base type, as a side-effect of how they were implemented.

Commit migrated from https://github.com/dotnet/corefx/commit/1f93d2a1c5f3bdeb8c091863236fe2071e5e66f5
2018-03-22 22:11:23 -04:00
Tomas Weinfurt 11740681f6 Improve HTTP proxy tests (dotnet/corefx#28048)
* refactor some proxy tests using new loppback server and new auth function

* feedback from reviews

* correct split() use. My local build did not fail for what ever reason

* disable ProxyExplicitlyProvided_DefaultCredentials_Ignored as it used to be

* refactor some proxy tests using new loppback server and new auth function

* feedback from reviews

* disable ProxyExplicitlyProvided_DefaultCredentials_Ignored as it used to be

* add test case for dotnet/corefx#27870

* skip new test on WindowNano

* add limit on Split() so it always splits to two tokens to avoid problems with : in the value

*  update Split() as it seems not all c# flavors has the righ overload

* small improvement on header split

* feedback from review


Commit migrated from https://github.com/dotnet/corefx/commit/b2a119950cb52dd744f84b552de1da2df07b937b
2018-03-22 18:01:15 -07:00
Stephen Toub 85e7f4e1aa Re-enable SocketsHttpHandler proxy test (dotnet/corefx#28186)
Commit migrated from https://github.com/dotnet/corefx/commit/089a8890c4f4d20dde6ee0ab6acfb3056f4887e6
2018-03-19 12:56:14 -04:00
Caesar Chen 9df60dc56a Make SocketsHttpHandler default Handler (dotnet/corefx#27821)
* set SocketsHttpHandler to default

* address feedback

* fix if check for 28002


Commit migrated from https://github.com/dotnet/corefx/commit/2b850f6fe5fd3171c2554da965cb07070e1d648e
2018-03-14 00:34:56 -04:00
David Shulman 0cb5ccfce2 Change behavior of SocketsHttpHandler for redirects (dotnet/corefx#28008)
When exceeding the max number of redirecs, .NET Framework will
not throw an exception. Instead, it will return the 3xx response.
This PR changes the behavior of SocketsHttpHandler to match.

Fixes dotnet/corefx#27285


Commit migrated from https://github.com/dotnet/corefx/commit/6e3a4143c221cba5f0f1b433b96477d24b7e9b02
2018-03-13 12:02:18 -07:00
Max Kerr 9485277884 CurlHandler: Remove Transfer-Encoding on redirect from POST to GET (dotnet/corefx#27988)
This fix removes the TransferEncoding header from a request when it is redirected from POST to GET.

Fixes: dotnet/corefx#27301

Commit migrated from https://github.com/dotnet/corefx/commit/94e4bc6e888825d2ad8f373c9bbc1b279608349b
2018-03-13 09:55:36 -07:00
Stephen Toub 700bbfd8dd Change CurlHandler to only request HTTP/2 over TLS (dotnet/corefx#27934)
* Change CurlHandler to only request HTTP/2 over TLS

* Add test that 2.0 request with http:// doesn't request Upgrade


Commit migrated from https://github.com/dotnet/corefx/commit/431475b8e5462fe7d6cf9e8d424d6624c08d6a3f
2018-03-12 12:46:09 -04:00
Stephen Toub a04cb1ef89 Disable hanging Proxy_UseSecureProxyTunnel_Success test on netfx (dotnet/corefx#27815)
Commit migrated from https://github.com/dotnet/corefx/commit/2660a4690f70c6278cbdb5564c3e62e51cc1a651
2018-03-07 09:52:11 -05:00