Commit Graph
256 Commits
Author SHA1 Message Date
stephentoub 685d9f5063 Add API review headers to ref files
Commit migrated from https://github.com/dotnet/corefx/commit/5240b324e50f9aabaa11d4b0c46acc34e370a724
2016-02-11 10:50:44 -05:00
Stephen Toub f581539eca Merge pull request dotnet/corefx#6016 from stephentoub/remove_cctors
Remove ~20 explicit static cctors across corefx

Commit migrated from https://github.com/dotnet/corefx/commit/11efc0d43d56e1c280653934b27ae5c1ef05af8c
2016-02-11 08:48:15 -05:00
stephentoub 0dc4f0e58f Remove a handful of explicit static cctors across corefx
Explicit static cctors cause the C# compiler to not mark types as beforefieldinit, which in turn means that the backend compiler needs to add checks to static methods to ensure that the type has been initialized.  We have a bunch of such cctors across corefx that can be easily removed; this commit does so.  In a few places, it also presizes some collections to help avoid unnecessary memory pressure.


Commit migrated from https://github.com/dotnet/corefx/commit/79ae21b1b9a113230da7ebfbffa4e3c3fe36f0ac
2016-02-11 07:59:21 -05:00
Stephen Toub 36e072e26f Merge pull request dotnet/corefx#6001 from stephentoub/http_logging
Enable EventSource logging in CurlHandler

Commit migrated from https://github.com/dotnet/corefx/commit/b50ddae49d917e9a3c7c3d244ece87d7cb805d0b
2016-02-10 23:34:27 -05:00
stephentoub 0970c41a6a Address PR feedback
Also removed a bit of gratuitous tracing. We can always add more later if/when we need it.


Commit migrated from https://github.com/dotnet/corefx/commit/7e21fb6673c8371f538cb456378d63cc71e7fc5c
2016-02-10 15:14:35 -05:00
stephentoub ab49739fb6 Enable EventSource logging in CurlHandler
We currently have a bunch of tracing in CurlHandler, but it's all guarded behind compile-time flags, making it difficult to use to diagnose issues.  This converts that to all be EventSource-based logging.  It also enables libcurl to provide its debug info via a callback, which is then routed to the EventSource as well, and mapped to the easy handles with which the info is associated.


Commit migrated from https://github.com/dotnet/corefx/commit/9c9120d7e4368d5a627a09ae4285c66432f5e4d2
2016-02-09 22:58:55 -05:00
Davis Goodin 1bc755f9e7 Adds custom xplat nuget that can restore from VSTS feed, adds the VSTS feed, and upgrades project.jsons throughout NDP\FxCore to pass new nuget compatability checks.
Some fixes (adding imports, adding Platforms package) were tooled, but more complex ones (forking project.jsons, editing csproj's) were not.

Also makes dependency version validation rules case-insensitive. (I used this fix to update the versions of some packages.)

[tfs-changeset: 1573868]


Commit migrated from https://github.com/dotnet/corefx/commit/84af04317505d48feaa1e83dd5dc27ddc0f6de76
2016-02-09 14:20:02 -08:00
Cristian Pop 01d61b736f Fixing and adding tests for the in-memory VirtualNetwork/Stream. Adding
TaskTimeoutExtensions and fixing the System.Net.Security timeout pattern.


Commit migrated from https://github.com/dotnet/corefx/commit/27954497d635ff0f01fbb16e1b485156c51398ea
2016-02-08 16:02:01 -08:00
stephentoub 2e521c57c9 Update packages to rc3-23808
Commit migrated from https://github.com/dotnet/corefx/commit/31bb3a0cd271aebc9a4336a53b0fc3bb900fe22f
2016-02-08 07:26:49 -05:00
stephentoub d4ec167e63 Use OpenSSL for cert chain verification in CurlHandler
Our certificate chain verification includes the ability to check user store certificates in addition to the root store, but it's more expensive than the default verification provided by OpenSSL, which only includes the system store.  This commit modifies our CurlHandler's VerifyCertChain implementation to first use the OpenSSL implementation, and only fall back to ours if it fails, resulting in much faster processing in https cases.


Commit migrated from https://github.com/dotnet/corefx/commit/65fa1710ebf14711a7ec9b03e00b24014e8e97eb
2016-02-05 13:46:57 -05:00
stephentoub 30a19d4335 Update packages to rc3-23803
Commit migrated from https://github.com/dotnet/corefx/commit/d27ef6fb6092060e643c49a670e825e0cc01ff4d
2016-02-04 07:38:24 -05:00
David Shulman 71baeeede4 Fix HttpClientHandler UseDefaultCredentials=false
HttpClientHandler (on Windows) was attempting to use default credentials against a server that needed auth even when the property .UseDefaultCredentials was set to false.

In order to map the different HttpClientHandler properties to the WinHttpHandler properties, the HttpClientHandler .UseDefaultCredentials. needs to turn on/off two credentials related properties of WinHttpHandler, .ServerCredentials and .DefaultProxyCredentials. However, it was only toggling the single .ServerCredentials property. The fix is to update both properties accordingly.

Fixes dotnet/corefx#5045.


Commit migrated from https://github.com/dotnet/corefx/commit/010801cbdfcb4f64152d2ba29da541ca395d0a8e
2016-02-02 11:12:03 -08:00
stephentoub 715cbde1c2 Update dependencies to rc3-23729
Commit migrated from https://github.com/dotnet/corefx/commit/372c940deee1f81c452e69a0ad46ae9f18f6d803
2016-01-29 18:11:41 -08:00
Jose Perez Rodriguez 88f2de884f Merge pull request dotnet/corefx#5711 from joperezr/RestoreMSBuild
Use .Net Core MSBuild for OS X and Linux Builds

Commit migrated from https://github.com/dotnet/corefx/commit/ab6ec2fa803a330e73809cf478753959a36185e5
2016-01-28 15:51:39 -08:00
Jose Perez Rodriguez 0df7c31e39 Use .Net Core MSBuild for OS X and Linux Builds
Commit migrated from https://github.com/dotnet/corefx/commit/4367ec4c791928c6b2f994e9602dbc75aea7934d
2016-01-28 08:46:24 -08:00
Stephen Toub 75b957414f Merge pull request dotnet/corefx#5723 from stephentoub/update_license_headers
Update licensing headers

Commit migrated from https://github.com/dotnet/corefx/commit/ac67ffac987d0c27236c4a6cf1255c2bcbc7fe7d
2016-01-27 14:10:52 -08:00
stephentoub 9ecf277528 Update package versions to rc3-23727
Commit migrated from https://github.com/dotnet/corefx/commit/c442e611d1b4dddc12703b8b80bea9f3889f141d
2016-01-27 08:08:48 -08:00
dotnet-bot 39d1eab950 Update licensing headers
Commit migrated from https://github.com/dotnet/corefx/commit/7cad8486cbabbce0236bdf530e30db7036335524
2016-01-27 08:02:28 -08:00
Stephen Toub 8d935f132d Merge pull request dotnet/corefx#5717 from CIPop/removeCsProjTodo
Removing/updating TODOs from System.Net CSProj files

Commit migrated from https://github.com/dotnet/corefx/commit/7ed0277b10518c257a907815b08762a8f77fa43c
2016-01-26 21:59:57 -08:00
Lakshmi Priya Sekar 1aa7a9ac09 Update packages version to 23726.
Commit migrated from https://github.com/dotnet/corefx/commit/213da430524eceb9e90883c3d08848f62c813a91
2016-01-26 16:30:20 -08:00
Cristian Pop 643a78f92f Removing/updating TODOs from System.Net CSProj files
Commit migrated from https://github.com/dotnet/corefx/commit/2e7bd14c5e55ecda926977eef6d5717644783059
2016-01-26 16:15:32 -08:00
stephentoub fd5d04a4d4 Remove "workaround" P2P TODOs from .csproj files
In the past we've added some temporary P2P references to workaround lack of bug fixes in packages.  Removing them as they're no longer needed.


Commit migrated from https://github.com/dotnet/corefx/commit/ba939973c07af13b01fe3b4f34e0a31eac6f90c7
2016-01-25 14:41:34 -05:00
stephentoub 4ef1e70a8a Update package dependencies to rc3-23725
Commit migrated from https://github.com/dotnet/corefx/commit/fad28575225858febd3069d41582a1502c5dda07
2016-01-25 14:38:56 -05:00
stephentoub 1c94eb73f6 Workaround bugs until new packages are available
Several bugs are causing tests to fail.  Those bugs have been fixed, but the fixes aren't yet available in the packages being targeted by other test libraries breaking because of the bugs. This temporarily works around it by using a P2P reference to skip the packages.


Commit migrated from https://github.com/dotnet/corefx/commit/5eb4a0405e16f1cc7d2488f9106f644141f62de5
2016-01-23 11:37:09 -05:00
stephentoub 6545572fb1 Upgrade packages to rc3-23722
Commit migrated from https://github.com/dotnet/corefx/commit/02ece5061a33a7c12113cc4a52b2321d9e6db185
2016-01-23 11:36:29 -05:00
David Shulman 66b56a9888 Merge pull request dotnet/corefx#5600 from davidsh/disable_test
Disable HttpClient test sometimes failing in CI

Commit migrated from https://github.com/dotnet/corefx/commit/12c0f65dde9465621931d5912dc9396ed7f002f0
2016-01-21 18:17:44 -08:00
David Shulman 51f723b25c Merge pull request dotnet/corefx#5590 from davidsh/stream_read_cancel
Fix hang when WinHttpHandler response stream reads are canceled

Commit migrated from https://github.com/dotnet/corefx/commit/9d16963865926a95c82beb4a2d779204706eaf28
2016-01-21 17:53:03 -08:00
David Shulman 0ca98c1564 Disable HttpClient test sometimes failing in CI
Ref: Issue dotnet/corefx#5485


Commit migrated from https://github.com/dotnet/corefx/commit/d4e51497615dc182d095b8f1645120811a617e88
2016-01-21 15:29:49 -08:00
David Shulman 7fb2e50275 Fix hang when WinHttpHandler response stream reads are canceled
The task from ReadAsync was never moving to a terminal state (i.e. "hanging") if the token was marked for cancellation after starting the task. The problem was that our task continuation wasn't being called if the token was cancelled before the continuation was scheduled.

The fix is to avoid passing in the token during the .ContinueWith call. Instead, the token is checked inside the continuation. This puts all the logic in the same place for checking the final status of the ReadAsync operation (which has multiple inner operations) including whether it should fault due to an error or have a successful completion.


Commit migrated from https://github.com/dotnet/corefx/commit/3ae96358a215023f3ecbba13fb4d860693f221c0
2016-01-21 14:56:26 -08:00
Eric Erhardt 4d42d8879e Bump ExpectedPrerelease version to latest (rc2-23713)
Commit migrated from https://github.com/dotnet/corefx/commit/ea4b19c136f3fa6355fd307b38cbe605b519b5eb
2016-01-21 09:46:18 -06:00
Eric Mellino f2572b1bab Merge pull request dotnet/corefx#5559 from mellinoe/system.net.http.rtc.netcore50.2
Add netcore50 configuration for System.Net.Http.Rtc

Commit migrated from https://github.com/dotnet/corefx/commit/76cb12b1a5c02134d39a2b79863a949bc8f3fab5
2016-01-20 20:11:23 -08:00
Eric Mellino 143cb0a1ca Add netcore50 build for System.Net.Http.Rtc
Commit migrated from https://github.com/dotnet/corefx/commit/2eaa55dbadff9394795e10472452b0277f811a90
2016-01-20 14:29:09 -08:00
Stephen Toub 1353919322 Merge pull request dotnet/corefx#5554 from stephentoub/proxy_creds_unix
Ignore default proxy credentials in CurlHandler

Commit migrated from https://github.com/dotnet/corefx/commit/dfb70a5cc9e90b69cf89ac9eb64b48b35b841773
2016-01-20 15:57:14 -05:00
stephentoub 256cd4da9a Ignore default proxy credentials in CurlHandler
There aren't "default credentials" on unix.  Just as CurlHandler treats UseDefaultCredentials as a nop, it should treat default proxy credentials as a nop rather than throwing an ArgumentException.


Commit migrated from https://github.com/dotnet/corefx/commit/53b777baacf9f70cfdeb322038717eb4b5e6db48
2016-01-20 13:15:43 -05:00
Eric Mellino f0ab1a0bef Add netcore50 configuration for System.Net.Http
Commit migrated from https://github.com/dotnet/corefx/commit/3eb60290fcaa5c9d5f57c4f5dea267916442e07c
2016-01-19 13:06:59 -08:00
Ian Hays e3311742d9 Bump ExpectedPrerelease version to latest (rc2-23712)
Commit migrated from https://github.com/dotnet/corefx/commit/01c61f62988e8abf39aecc64b0a97ea4e384de3f
2016-01-14 10:36:27 -08:00
dagood e401efd6af Add portable-net45+win8 import to tests.
Specifically, add the import to dnxcore50 frameworks entries where "xunit" is mentioned in the project.json.
This fixes `xunit.abstractions 2.0.0 is not compatible with DNXCore,Version=v5.0.`


Commit migrated from https://github.com/dotnet/corefx/commit/da2e8eb34efcaf70069223bc431d80909a2fc91d
2016-01-12 14:04:32 -06:00
Wes Haggard a3e67fdf73 Update .builds files to include OSGroups
This these .builds files were updated and generated from a script
based on the configurations defined in the matching csproj files.

This updates the builds files to specify OSGroup and TargetGroup
as metadata instead of using AdditionalProperties and also sorts them by
TargetGroup followed by OSGroup.


Commit migrated from https://github.com/dotnet/corefx/commit/95efe37475916016a5fc6ee6f0ba584d990c4196
2016-01-02 23:50:23 -08:00
Wes Haggard f27c7dc024 Update project files adding default configurations
This add a default configuration before the Import of dirs.props
for any projects that don't have Debug as the default configuration.

Removed Configuration and Platform properties set after dirs.props
as they would have no affect and just cause confusion.

Removed OutputType=Library property as it isn't necessary.


Commit migrated from https://github.com/dotnet/corefx/commit/9e1da13cf6d5ff4b37b1867beb3411a2fe61da6a
2016-01-02 23:50:21 -08:00
Guillermo Rangel 1a62aca39f System.Net EventSource Logging
Adding EventSources to substitute the previous logging model using
TraceSources.

In this PR 4 event sources are added:

-NetEventSource
-SocketsEventSource
-HttpEventSource
-SecurityEventSource

Event methods for NetEventSource, SocketsEventSource and HttpEventSource
are
fully added. SecurityEventSource has only a few of
the new event methods implemented.
Changes in production code are done to match this new implementation.
(Only changes for
events in Sockets and Http are done in this iteration).

Adding missing reference to LoggingHash

Missing Reference in Security csproj

Missing reference in NetworkInformation

Adding a reference and adding a missing new line.

Adding references and readonly modifier.

Adding another missing reference.
Adding some missing blank lines and making readonly the s_log in the
EventSources.

Completing SecurityEventSource

Adding missing all the security events that will substitute PrintInfo
calls.

Doing changes in code to reflect this.

Transforming SecurityEventSource into a Partial class

Some of the events were Windows specific, because of the enums they were
using. Those events are now in a partial class that is included when
those enums are defined.

Moving events to partial SecurityEventSource class

Some more events using Interop.SecurityStatus are moved into the partial
windows specific class.

Also, a missed non event header is added for Associate method in
HttpEventSource.

Deleting Logging reference to instead use LoggingHash

Addressing some of the PR feedback

Adding the Issue number to TODO for localization, and using BlockCopy
instead of a Loop to copy array. Also, correctly passing partialBuffer
instead of Buffer to the DumpArrayAsync method.


Commit migrated from https://github.com/dotnet/corefx/commit/1cd8bf635d4b9a6d8a7d1e25cd320814c993f38b
2015-12-29 12:14:39 -08:00
Hemanth Kapila 5249e8016b CurlHandler fix for cookie handling
CurlHandler has been handling cookies only from the final HTTP response.
The cookies sent during the intermediate http responses (during 3XX
redirection as well as interim 401, 407 responses) were getting ignored.
This fix ensures that the cookies from all the responses are handled.


Commit migrated from https://github.com/dotnet/corefx/commit/742f6608ad14933295b3a64cf9859c9ba961c8d1
2015-12-24 19:00:53 +05:30
Pallavi Taneja 95a3b67166 Expose Assembly.GetEntryAssembly and TypeInfo.IsEquivalentTo()
Expose Assembly.GetEntryAssembly and TypeInfo.IsEquivalentTo() in System.Reflection.
Fixes issues dotnet/corefx#4146 , dotnet/corefx#2101


Commit migrated from https://github.com/dotnet/corefx/commit/e28fdbd9dd98810a81207c665fdc4e6b40b24e64
2015-12-21 14:56:26 -08:00
Pallavi Taneja 90c2d27bf1 Update Corefx Repo to depend on newer package versions
Disable failing tests with the tracking active issue


Commit migrated from https://github.com/dotnet/corefx/commit/98fdc29624cd791bba42ec1e0cd5c256f331adfe
2015-12-21 11:48:15 -08:00
David Shulman eafca6efa3 Fix WinHttpHandler response handling for manual cookie parsing
WinHttpHandler was losing 'Set-Cookie' response headers during auto redirection handling when the handler was in 'manual cookie' mode. I.e. `CookieUsePolicy.UseSpecifiedCookieContainer`. This is the only mode that HttpClientHandler uses.

The 'Set-Cookie' headers were currently only parsed out when a final HTTP response happened. This meant that 'Set-Cookie' headers present in interim 3xx redirection responses as well as interim 401, 407 auth responses would not be stored into the CookieContainer. Hence, those same cookies could not be sent back to the server when needed.

The fix is to make sure we parse out the 'Set-Cookie' headers whenever we get an HTTP response back from WinHTTP. As part of this fix, I re-factored out the cookie handling code into a separate class. I also added specific WinHttpHandler tests for the two different cookie modes as well as a HttpClientHandler test to validate cross-platform (i.e. CurlHandler).

Address dotnet/corefx#4960 but further fixes are needed for *NIX as well.


Commit migrated from https://github.com/dotnet/corefx/commit/8ac944afcbd35d8b489e14e1c4c7f4be08f74c72
2015-12-17 10:59:08 -08:00
Hemanth Kapila 47ab758145 CurlHandler Fix for request uri during redirect
CurlHandler is fixed to set the Response.RequestMessage.RequestUri to
the redirected uri.


Commit migrated from https://github.com/dotnet/corefx/commit/c6bd6230f268f49c09d04ea2d000eb71c6ecc57f
2015-12-15 20:10:03 +05:30
stephentoub 77c4183d17 Update package validation to rc2-23610
Commit migrated from https://github.com/dotnet/corefx/commit/6f6303f0356be4d2dd4ac117373f1e37f8752248
2015-12-11 10:53:47 -05:00
dagood fbfb82cc8c Change all project.json files to validate. Remove lockfiles from source control and add to gitignore.
A few new references to pick up changes that happened over time.


Commit migrated from https://github.com/dotnet/corefx/commit/0d881222d8c3269157639e2e67056e5a83aad834
2015-12-09 16:25:26 -06:00
David Shulman 5be0d2772f Fix tests to use unknown HTTP version
The default value for HttpRequestMessage.Version is Version(1,1). So, we
need to set something different to test the "unknown" version.


Commit migrated from https://github.com/dotnet/corefx/commit/b921e2493feba902ca4394f77a4406ec20810d8e
2015-12-09 11:35:43 -08:00
David Shulman d8f262defb Support HttpRequestMessage.Version in WinHttpHandler
WinHttpHandler was currently ignoring the `HttpRequestMessage.Version`
property and was always sending out requests using 'HTTP/1.1' which is the
default for winhttp.

This fix now will look at the request message `Version` property and
send out the request using either 1.0 or 1.1.  If neither of these
versions are specified, then the request is sent out using the default
winhttp version (which is currently 1.1 as of Windows 10).

Note: The .NET Framework (Desktop) will throw an exception if neither
1.0 nor 1.1 version is specified.  Currently CoreFx including NETNative,
WinHttpHandler and CurlHandler will simply use a default instead of
throwing. While this is different behavior than Desktop, it is more
desirable in the long run.

There is a separate issue dotnet/corefx#4870 to add HTTP/2.0 support to WinHttpHandler.

Fixes dotnet/corefx#4754


Commit migrated from https://github.com/dotnet/corefx/commit/f48989bbe10dd4b24a9e3b085672c30b5251cda6
2015-12-09 11:13:03 -08:00
Eric Erhardt e1abc6cf8b Move the IO check for EINTR down into the native shims.
This allows for the managed code to be cleaner, and it can easily return SafeHandle objects from P/Invoke methods.
Also, it fixes the problem where some code wasn't looping on Interop.CheckIo, which is a problem when EINTR is returned.

Fix dotnet/corefx#3168


Commit migrated from https://github.com/dotnet/corefx/commit/c0ded7d939c7c8ae702586f57011265686879537
2015-12-08 21:24:30 -06:00