Commit Graph
329 Commits
Author SHA1 Message Date
Wes Haggard cd52f14fb9 Merge pull request dotnet/corefx#9233 from chcosta/nethttp_repro
Remove keepallprojectreferences from system.net.http and system.net.security tests

Commit migrated from https://github.com/dotnet/corefx/commit/fc88bf49cf8cdaa6c5484b3e19f8f17cccd50fbb
2016-06-07 23:04:01 -07:00
Stephen Toub 2cbd59ef6f Merge pull request dotnet/corefx#9208 from stephentoub/fix_header_parsing
Allow whitespace after HTTP response header name

Commit migrated from https://github.com/dotnet/corefx/commit/ca0075eda676f9a35f43a0c6994fc08c0b1981b3
2016-06-07 13:19:37 -04:00
Christopher Costa 80bca9a4b4 Remove keepallprojectreferences
Commit migrated from https://github.com/dotnet/corefx/commit/25d4dbf46ed63abd4ff96a8f855f21c4420ae597
2016-06-07 10:15:34 -07:00
Stephen Toub 2f0636a244 Allow whitespace after HTTP response header name
Be a bit more lenient in what we allow in the formatting of response headers on Unix. The RFC states that "Each header field consists of a case-insensitive field name followed by a colon (":"), optional leading whitespace, the field value, and optional trailing whitespace." However, whitespace between the header name and the colon is accepted by WinHttpHandler, by the .NET Framework, and by all browsers on which I tried it, and servers can easily include such whitespace; if they do and we're not tolerant of it, requests to such servers will fail.


Commit migrated from https://github.com/dotnet/corefx/commit/888a01cbcb1a98377ebf6e87e89a2551aac1654d
2016-06-07 09:38:20 -04:00
dotnet-bot 349036ec6b Updating CoreFx dependencies to rc4-24207-03
Commit migrated from https://github.com/dotnet/corefx/commit/dbc9db2a3378417434c4fb9e531a788d14eb9621
2016-06-07 13:21:03 +00:00
dotnet-bot 19fa55e533 Updating CoreFx dependencies to rc4-24207-02
Commit migrated from https://github.com/dotnet/corefx/commit/1ad197d9386e4d5dcd6e2bfdc5ed753a0f965893
2016-06-07 07:19:35 +00:00
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 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