Commit Graph
289 Commits
Author SHA1 Message Date
dotnet-bot 1a2c5d511a Updating CoreFx dependencies to rc4-24205-02
Commit migrated from https://github.com/dotnet/corefx/commit/f543d6c01894f2ce22c46ce2f9e8e97adb7d751e
2016-06-05 07:06:42 +00:00
dotnet-bot 832c793afe Updating CoreFx dependencies to rc4-24205-01
Commit migrated from https://github.com/dotnet/corefx/commit/4638fa6cffdc05bf0efdb528b6d9e9bca1d9290d
2016-06-05 01:09:11 +00:00
dotnet-bot 44203d6255 Updating CoreFx dependencies to rc4-24204-04
Commit migrated from https://github.com/dotnet/corefx/commit/7565dc2368d20db4fd77e9b55ace3305488ed546
2016-06-04 19:07:36 +00:00
dotnet-bot bde86715af Updating CoreFx dependencies to rc4-24204-03
Commit migrated from https://github.com/dotnet/corefx/commit/3a11ec14d8aa9c33bd5fc84a81d748766c756146
2016-06-04 13:05:27 +00:00
Stephen Toub 05c80e923c Merge pull request dotnet/corefx#9109 from stephentoub/clientcert_tests
Add some HttpClientHandler client certificate tests

Commit migrated from https://github.com/dotnet/corefx/commit/a25394ed35d6484f50a063a622fa52df1553d1f0
2016-06-04 05:55:29 -04:00
Stephen Toub 9a11ee5651 Merge pull request dotnet/corefx#9140 from stephentoub/revert9102
Revert "Flow HttpClient timeouts and cancellation to the response stream"

Commit migrated from https://github.com/dotnet/corefx/commit/62d0ddefab515489010ae1464d712348b9d053a1
2016-06-04 05:55:14 -04:00
Stephen Toub 9ec85d26d0 Revert "Flow HttpClient timeouts and cancellation to the response stream"
This reverts the product changes from commit dotnet/corefx@cc8b48c8ea.  The test changes remain.


Commit migrated from https://github.com/dotnet/corefx/commit/ef6b3490bb2d376d42eeddbc4db45414a23c7804
2016-06-03 21:33:31 -04:00
Stephen Toub 00f486042d Fix HttpClientMiniStressTests tests
These were broken at some point (almost all of the tests fail, complaining about invalid responses from the server), but we didn't notice because they're not enabled by default.


Commit migrated from https://github.com/dotnet/corefx/commit/ef77613d8732beab380b058368bb7bcf2cc54369
2016-06-03 15:42:48 -04:00
Stephen Toub 1d23722d72 Merge pull request dotnet/corefx#9102 from stephentoub/slowread_windows_cancellation
Flow HttpClient timeouts and cancellation to the response stream

Commit migrated from https://github.com/dotnet/corefx/commit/3eb2e11d028a8b9e9e861cd595235a314c7a2560
2016-06-03 13:10:47 -04:00
Stephen Toub ea6cd05418 Add some HttpClientHandler client certificate tests
And fix a small bug discovered from this, lack of argument validation when setting the enum value.


Commit migrated from https://github.com/dotnet/corefx/commit/483aa5a3012fe78ea001ece1b0404b18c0b90a29
2016-06-03 13:09:23 -04:00
dotnet-bot bbbd91a21c Updating CoreFx dependencies to rc4-24203-06
Commit migrated from https://github.com/dotnet/corefx/commit/fa054f7d8012b5361b4614d1b2e5912291a8d6da
2016-06-03 13:06:55 +00:00
Stephen Toub b1895678eb Flow HttpClient timeouts and cancellation to the response stream
When using a timeout and/or a cancellation token with a buffered HttpClient operation, the cancellation/timeout doesn't flow through to the actual read/write operations on the underlying streams.  This means that on Windows, doing a basic operation like GetStringAsync with a server that pauses for arbitrarily long periods of time while sending the response body won't cancel or timeout until it sends more data. (We don't need to do this on Unix, as on Unix we already handle this case differently, with a single registration for the duration of the SendAsync operation.)


Commit migrated from https://github.com/dotnet/corefx/commit/cc8b48c8ea41b9cee888055483d16072f3f3a1c5
2016-06-03 07:12:28 -04:00
dotnet-bot c4da362b9c Updating CoreFx dependencies to rc4-24203-05
Commit migrated from https://github.com/dotnet/corefx/commit/18ace4063860ae0db9ff303f14609368719fa8f5
2016-06-03 07:10:21 +00:00
Davis Goodin 1418be0568 Upgrade CoreFX version to rc4-24201-04 from the build pipeline.
Commit migrated from https://github.com/dotnet/corefx/commit/7ce67d490263f936fd093b70e41a010d9be6a970
2016-06-01 13:53:46 -05:00
Stephen Toub 4077430754 Merge pull request dotnet/corefx#9024 from stephentoub/http_sendasync_tests
Add several HttpClientHandler tests related to content

Commit migrated from https://github.com/dotnet/corefx/commit/cdba60ecba957272a77ccc8245ab6ba29535380b
2016-06-01 14:19:34 -04:00
Stephen Toub ad4e7cb1ab Fix CurlHandler handling of redirects (dotnet/corefx#8946)
* Fix CurlHandler handling of redirects

- Relative urls in Location headers were not being handled correctly.  We now allow any url that TryCreate will parse using the current url as a base.
- We were only handling a subset of redirect status codes as redirects, trying to second-guess which status codes libcurl would redirect for, e.g. 300 wasn't being treated as a redirect. We now let libcurl do all the work.
- We should have been playing it safer with regards to clearing out credentials if we weren't sure a Uri redirect location was valid. Now we do.
- We were tracking state unnecessarily that we should have instead been
  asking libcurl for, e.g. the last url used in a redirect.  This also caused us to store the wrong RequestMessage.Uri in some cases where a location header came in but we didn't actually follow it.

Commit migrated from https://github.com/dotnet/corefx/commit/7bd18d682f0e201275c988e6263239ab84f6389b
2016-06-01 08:41:23 -04:00
Stephen Toub 3f7c097a58 Add several HttpClientHandler tests related to content
- Verify that request content isn't disposed until after response content is buffered
- Verify that request content isn't disposed until after request content is sent and response headers are received
- Verify that verbs which shouldn't send request content don't


Commit migrated from https://github.com/dotnet/corefx/commit/9c0eaa1b7a4812f50ac37f4adde516971d9b333a
2016-06-01 08:38:58 -04:00
Matt Ellis 94c58f546c Use correct openSUSE RID
When I added the rid, I forgot to append the -x64 part, which prevented
the openSUSE build from restoring a runtime, since that part is platform
specific.


Commit migrated from https://github.com/dotnet/corefx/commit/d02e47ec2d44fae9d45d29d49f356199ed59b406
2016-05-31 17:52:15 -07:00
Stephen Toub f9fc17df13 Remove innerloop dependencies on www.ssllabs.com
We have several innerloop tests that make HTTP calls during System.Net.Http.Functional.Tests out to www.ssllabs.com, which has SSL endpoints for different SSL protocols.  This commit avoids using that server during innerloop tests.  The tests are moved to outerloop, and some replacements using a localhost are added to innerloop.


Commit migrated from https://github.com/dotnet/corefx/commit/8a9402b33d46166d1a3129a7c2cae0334b00c4b6
2016-05-31 17:05:10 -04:00
dotnet-bot cfde5f8d34 Updating CoreFX dependencies to rc4-24131-00
Commit migrated from https://github.com/dotnet/corefx/commit/7a16fac72dca8b3442e4425896593a0d24fd0fd2
2016-05-31 06:57:39 +00:00
Stephen Toub 2424c43e44 Improve tracing in CurlHandler
While debugging some HttpClient issues, I needed more tracing in CurlHandler.  It's useful to check this in to help with future investigations.


Commit migrated from https://github.com/dotnet/corefx/commit/48da5807ac281c26b34ac375755a4d83b2268a91
2016-05-27 13:19:45 -04:00
dotnet-bot f0fa9faf0b Updating CoreFX dependencies to rc4-24127-00
Commit migrated from https://github.com/dotnet/corefx/commit/9f0469d8011336f7bf60365b017dcbe7df537dc0
2016-05-27 06:49:24 +00:00
Matt Ellis 1c7fd4103c Add additonal runtimes
Commit migrated from https://github.com/dotnet/corefx/commit/3ce0367e0f62cdd71aa4368abca30658b315079d
2016-05-25 23:23:02 -07:00
dotnet-bot 91d532f5fc Updating CoreFX dependencies to rc4-24126-00
Commit migrated from https://github.com/dotnet/corefx/commit/1a374cac6178651a21298020b2b3d6eb897d1837
2016-05-26 05:46:42 +00:00
dotnet-bot 032dea8c8b Updating CoreFX dependencies to rc4-24125-00
Commit migrated from https://github.com/dotnet/corefx/commit/9cd447dda0dfa473fb814dd6a3a1504764fa7bf4
2016-05-25 13:52:14 -07:00
Eric StJohn 64dd1b53f2 Merge pull request dotnet/corefx#8838 from ericstj/test-netstandardapp1.0
Test netstandardapp1.0

Commit migrated from https://github.com/dotnet/corefx/commit/673e8307ec8811ce85c3f17cc5375a468a2fb152
2016-05-25 06:12:55 -07:00
Eric St. John 5a444416fd Update tests to use NETCoreApp1.0 moniker
Requires https://github.com/dotnet/buildtools/pull/751

This makes all the tests resolve using NETCoreApp1.0 instead of
DNXCore50.  I've removed the netstandard1.6 import since that is no
longer needed.  I've also removed the workarounds from tests that were
targeting netcoreapp1.0 on their own.  For restore compat I've added an
DNXCore50 import to every test project.  These can be removed once
test-runtime packages are updated to target NETCoreApp1.0.

I've updated all the test scripts which were assuming DNXCore50 as well
as docs which referred to this path.


Commit migrated from https://github.com/dotnet/corefx/commit/7ba4d296e3e0a2445ffa708c1e918d90d2bac69c
2016-05-24 21:49:17 -07:00
Cristian Pop 51e3b454ee Fixing integration error within Http tests.
Commit migrated from https://github.com/dotnet/corefx/commit/41f9406775c62f1635b57ed72e3693b743905c49
2016-05-24 17:01:15 -07:00
dotnet-bot 52a5140af7 Use SchSendAuxRecord in SslStream on Windows.
[tfs-changeset: 1607766]


Commit migrated from https://github.com/dotnet/corefx/commit/91f1698b5139a0f618c0248e384c32d9bbe291c5
2016-05-24 17:01:01 -07:00
David Shulman 7bd12ef540 Merge pull request dotnet/corefx#8693 from davidsh/responsestream_cancelread
Fix cancellation of WinHttpHandler response stream reads

Commit migrated from https://github.com/dotnet/corefx/commit/7a55665dd4f068e5bce748107b6a53fcb5e5c14c
2016-05-19 18:39:33 -07:00
David Shulman 107ed2e91a Address PR feedback 2
Commit migrated from https://github.com/dotnet/corefx/commit/11942a384a06fbce76a04e445fd8c42cf4224589
2016-05-19 12:46:35 -07:00
David Shulman 87cf76acf3 Fix cancellation of WinHttpHandler response stream reads
Reading from the response stream using ReadAsync() was ignoring the cancellation token passed in. To fix this, registered a delegate that will be called to dispose the WinHTTP request handle during pending I/O. This will cause the WinHTTP operation to cancel.

Added tests. For now, left them disabled to be resolved in issue dotnet/corefx#8692 next week. But wanted to get this fix in asap since it blocks partners for RTM.

Fixes dotnet/corefx#8662.


Commit migrated from https://github.com/dotnet/corefx/commit/a6e019d8e1910b9fed3c1077be23bfd9023d2837
2016-05-19 10:12:09 -07:00
Matt Ellis e80c1f6794 Remove debian.8.2-x64 rid from projects
debian.8-x64 is the correct rid for debian and CI no longer uses it.


Commit migrated from https://github.com/dotnet/corefx/commit/8eba099f188af464e5e4ef8cd1b75ec53b137918
2016-05-17 19:22:33 -07:00
dotnet-bot 3aa5dbf336 Updating CoreFX dependencies to rc3-24117-00
Commit migrated from https://github.com/dotnet/corefx/commit/976b88889266258325f501e443b5bda6200cd3cc
2016-05-17 16:57:43 -04:00
bartonjs e2af1bb6c4 Clear the libcrypto error queue before doing SSL/TLS operations.
If an SSL operation fails, we call SSL_get_error to determine how to proceed.
SSL_get_error's logic is, essentially
  libcrypto_error ?? WANT_READ ?? WANT_WRITE ?? WANT_X509 ?? panic

This means that if a previous call into libcrypto on the same thread had left
something in the error queue when the operation goes into the WANT_READ state (etc)
SSL_get_error will report that the request must have failed due to something in
libcrypto.

There are two different fixes being done here:
1) PKCS12_parse is a known contributor to this problem, clear out the queue on a
successful exit.
2) Before any SSL stream operation (handshake, read, write, shutdown) clear the
queue, in case there are other functions which are leaving dangling errors.

With those mitigations in place, the intermittent errors seen during SslStream
usage should hopefully be a thing of the past.


Commit migrated from https://github.com/dotnet/corefx/commit/80a53ed415ece115d15bcf519e81e600362fd3dc
2016-05-17 09:09:53 -07:00
Matt Ellis 4c035bad61 Merge pull request dotnet/corefx#8544 from ellismg/add-rids
Add additional runtimes

Commit migrated from https://github.com/dotnet/corefx/commit/fc5926e933371c755094c1c68f7cd39b73ae727c
2016-05-16 11:22:54 -07:00
David Shulman f94d450d1a Merge pull request dotnet/corefx#8553 from davidsh/defaultauth_fix
Fix WinHttpHandler default cred auth when server offers multiple schemes

Commit migrated from https://github.com/dotnet/corefx/commit/7e87430a5ee2f747e028829903bb1d8e5ecd967d
2016-05-16 08:56:44 -07:00
David Shulman 5b5872fb3c Address PR feedback
Commit migrated from https://github.com/dotnet/corefx/commit/cc94fe3430c0bbd4603589865885c093a9e58415
2016-05-16 07:00:49 -07:00
David Shulman c04a0f68e8 Change some System.Net.Requests tests to use LoopbackServer
Changed HttpWebResponse test to use LoopbackServer.

More tests will be changed to use this server as part of
increasing test reliability and simplifying the requirements for the Azure test server.


Commit migrated from https://github.com/dotnet/corefx/commit/3aaaf19bd94bfcac533787ed45e1c3218168b7fa
2016-05-15 20:58:50 -07:00
David Shulman db9be5c4c1 Fix WinHttpHandler default cred auth when server offers multiple schemes
When a server offers multiple auth schemes, WinHttpHandler is supposed
to select the more secure scheme regardless of the order of the
authentication headers. So, despite a server offering Basic and
Negotitate (in that order), Negotiate would be selected.

When using default credentials, however, it was not calling
WinHttpSetCredentials(null, null). This resulted in the first scheme
offered by the server (Basic) to be attempted. But there were no
credentials set and so a 401 resulted.

Fix WinHttpHandler so that it will always call WinHttpSetCredentials
even with default credentials. This ensures that the selected auth
scheme (in this case Negotiate) is used correctly.

Revised test configuration instructions. An IHttpModule is used for the
test server endpoint to ensure that IIS will put 'Basic' first in the
response headers.


Commit migrated from https://github.com/dotnet/corefx/commit/9c6821d9d39ebe67b03f6e491489ffbb44844612
2016-05-15 17:00:02 -07:00
stephentoub f44781c5fd Add test verifying HttpClient negotiates Tls12 when None specified
Commit migrated from https://github.com/dotnet/corefx/commit/22e060a3d7735a2b64bf4f409bee91d675866d39
2016-05-15 16:31:36 -04:00
Matt Ellis 39c142ef5a Add additional runtimes
- Add "debian.8-x64". This is the correct rid for Debian, after this
  lands, I will need to update CI before we can remove "debian.8.2-x64"

- Add a generic "linux-x64" rid which we can use in cases where we want
  to build for a distro where we don't yet have a set of runtime
  packages.  This will let us restore the managed assets (since they are
  specific to "unix" or "linux" and then folks can do a native build to
  get the shims and runtime and copy them over (this is a more
  reasonable approach than our current strategy of just using
  ubuntu.14.04-x64)

- Sort runtime sections


Commit migrated from https://github.com/dotnet/corefx/commit/6fa4bc1d215d17ff484aa3f541c5e3181f6918de
2016-05-15 00:19:07 -07:00
David Shulman aed74e56f1 Address PR feedback
Commit migrated from https://github.com/dotnet/corefx/commit/53c50e84f6be882f896d01b5ec99d2183cb44c48
2016-05-14 19:46:36 -07:00
David Shulman 354c2e5b9c System.Net.Http 4.1 contract implementation
As per approved dotnet/corefx#7623, add remaining properties to HttpClientHandler for
all platforms.

Move pre-existing Unix-only Http tests to run for all platforms.

Ensure that "credentials" related properties are secure by default and have
an initial (default) value of null.


Commit migrated from https://github.com/dotnet/corefx/commit/361b66146506a58f7d2c27224cc02f9583cd0639
2016-05-14 17:07:27 -07:00
Stephen Toub 76fe11578e Merge pull request dotnet/corefx#8521 from stephentoub/curlhandler_sslprotocols
Change CurlHandler.SslProtocols default

Commit migrated from https://github.com/dotnet/corefx/commit/0953751fb947b5a826b2fc5f3a1350c73c9f92cd
2016-05-14 18:40:43 -04:00
stephentoub c43ac8a969 Change CurlHandler.SslProtocols default
Same change as https://github.com/dotnet/corefx/pull/8518, but for CurlHandler.


Commit migrated from https://github.com/dotnet/corefx/commit/3b8756c8b966f93afbe01f24e50794587ef465c9
2016-05-13 19:55:32 -04:00
chcosta a33dd88be4 Disable system.net.http.functiona.tests and system.net.security.functional.tests from projectreference->package dependency conversion. (dotnet/corefx#8505)
Commit migrated from https://github.com/dotnet/corefx/commit/e63e09b758daca6f16d62fa82f40608d18030aa0
2016-05-13 15:11:21 -07:00
dotnet-bot 8e00f7db31 Updating CoreFX dependencies to rc3-24113-00
Commit migrated from https://github.com/dotnet/corefx/commit/4a1e90e8a33c423e5356e9850b834cbfa24bfde7
2016-05-13 15:50:55 +00:00
stephentoub 095291bb48 Remove CurlHandler.ConnectTimeout property
I'd added this when bringing properties from WinHttpHandler to CurlHandler in bulk, with the expectation that we might expose them.  Since we're not planning on exposing this particular property from HttpClientHandler (turns out it's not very useful in practice), I'm removing it.


Commit migrated from https://github.com/dotnet/corefx/commit/953bbe0006ce7f29c87b798eb10d072df06d6f99
2016-05-13 07:46:47 -04:00
David Shulman 6489f6d1c9 Add configurable test settings for Http and WebSocket tests (dotnet/corefx#8480)
Building on the current use of environment variables for passing in test settings, added a common test helper class to allow the http and websocket tests to access alternate test servers. This will help with load balancing and network latency issues which are causing occasional timeouts in CI tests. This will also allow developers to run their own version of the Azure test endpoints. Consolidated the current environment variables used and standardized on a naming format.

Fixes dotnet/corefx#2383.

Commit migrated from https://github.com/dotnet/corefx/commit/3603ed2578220f0ecb2f101324e04acb80fa3196
2016-05-12 14:57:03 -07:00