Commit Graph
574 Commits
Author SHA1 Message Date
dotnet-bot 5d49d2be32 Updating CoreFx dependencies to rc4-24206-03
Commit migrated from https://github.com/dotnet/corefx/commit/684a9a1dbe3c467e170c50eff84ff09dbd964b9b
2016-06-06 13:11:57 +00:00
dotnet-bot 8e078b77e7 Updating CoreFx dependencies to rc4-24206-02
Commit migrated from https://github.com/dotnet/corefx/commit/c1bffac7c759702cadd48ae3fb883a5ef38f3275
2016-06-06 07:05:37 +00:00
dotnet-bot 9b556b2ad6 Updating CoreFx dependencies to rc4-24205-04
Commit migrated from https://github.com/dotnet/corefx/commit/130fb7ad9c1f44fa54488a287a4a835567910dc0
2016-06-05 19:06:03 +00:00
dotnet-bot 53b5786639 Updating CoreFx dependencies to rc4-24205-03
Commit migrated from https://github.com/dotnet/corefx/commit/2ac2a1abf6edc0409e0398fa907b67a658a9812c
2016-06-05 13:11:27 +00:00
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 242120ab04 Merge pull request dotnet/corefx#9131 from stephentoub/fix_clientcert_crash
Fix crash in HttpClient on Unix when using client certificates

Commit migrated from https://github.com/dotnet/corefx/commit/30eee0b348e6a2ed1c3c40f94c2b5d53e769b274
2016-06-03 21:57:18 -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 58db78235b Fix crash in HttpClient on Unix when using client certificates
In HttpClient on Unix when a client certificate is used, we add the intermediate certificates for the client authentication cert's chain so that the server can chain-verify.  When we add the extra chain certificate to the SSL handle, we're transferring ownership to that handle, which we subequently dispose... but we don't mark the original SafeHandle as invalid, so it eventually gets finalized and we end up double-free'ing, leading to seg faults and other badness.  This commit simply cleans up the handle appropriately.


Commit migrated from https://github.com/dotnet/corefx/commit/0b8dfc5774f66b8538e07813113d6c962a8d5775
2016-06-03 19:02:44 -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 cec5f6a127 Merge pull request dotnet/corefx#8935 from stephentoub/move_request_dispose
Dispose of request HttpContent after buffering response

Commit migrated from https://github.com/dotnet/corefx/commit/eb4c047e43f7618bc6ecad53fbbe631fb2318a51
2016-05-31 19:10:16 -04: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 0eeaf383f8 Fix client certificates-related crash
We're disposing of OpenSSL resources we shouldn't be.  When libcurl goes to close an SSL connection and doing so attempts to free these resources we already freed, it seg faults.


Commit migrated from https://github.com/dotnet/corefx/commit/ceba0e5dda567f2b2635b55db328415fd407b318
2016-05-29 08:18:04 -04:00
stephentoub 104f40f163 Dispose of request HttpContent after buffering response
Commit migrated from https://github.com/dotnet/corefx/commit/608ce0d2bc26047d8b1fd3cb65c0efaffbf79ae7
2016-05-27 18:15:01 -04: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
Jeremy Barton 8bee2b9e93 Bump the Unix TargetFramework to 1.6 for OpenSsl-consuming packages
System.Net.Http:
Unix runtime was already special-case lifted to 1.4, now it's 1.6.

System.Net.Security:
Unix runtime was already special-case lifted to 1.4, now it's 1.6.

System.Security.Cryptography.X509Certificates:
Windows netcore50 and facades are unaffected.
Otherwise, for both Unix and Windows, the minimum runtime is now 1.6.  Since netcoreapp1.0 is a 1.6 runtime, no problems are anticipated.


Commit migrated from https://github.com/dotnet/corefx/commit/ebb71ce79c79814304657e1ff7aa520d3a6d0ff2
2016-05-20 18:24:07 -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
Jeremy Barton eac5aaca84 Merge pull request dotnet/corefx#8452 from kapilash/relocate
Moving SafeDeleteContext and SafeFreeCredentials to common location

Commit migrated from https://github.com/dotnet/corefx/commit/b020dfd7aa480897794a24c9f48eb01d4b27460b
2016-05-19 07:07:12 -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
Hemanth Kapila f81dc39f75 clean src\Common\src\Interop\Unix\libssl directory
* Corefx does not pinvoke into libssl directly anymore. This commit moves the Interop files in $(COMMONPATH)\Interop\Unix\libssl to $(COMMONPATH)\Interop\Unix\System.Security.Cryptography.Native directory. Likewise, the SecuritySafeHandles are split across different files and are moved to $(COMMONPATH)\System\Net\Security\Unix.


Commit migrated from https://github.com/dotnet/corefx/commit/76eb58c3b60040ec7a32dcfd3593d67a27494dab
2016-05-16 17:23:45 +05:30