Commit Graph
783 Commits
Author SHA1 Message Date
Eric St. John 04a73fbed6 Update packages to rc3-23908
Commit migrated from https://github.com/dotnet/corefx/commit/86a230845c4f1840dcb9b52165c6976fad5b5868
2016-03-08 08:46:50 -08:00
Stephen Toub ab2ef9d0fd Merge pull request dotnet/corefx#6727 from davidsh/blank_statusdescription
HttpResponseMessage.ReasonPhrase should not be null

Commit migrated from https://github.com/dotnet/corefx/commit/3da7a023a2cf89c0a980a6c5cde25b67be530f68
2016-03-07 20:40:09 -05:00
David Shulman fe95f82188 Address PR feedback
Commit migrated from https://github.com/dotnet/corefx/commit/4899e455c04c65607dc8e8022358c9b01fccc2b9
2016-03-07 15:33:10 -08:00
Eric St. John 65d3d63e3e Workaround no NETStandard1.3 support in X509 pkg
Switches from package to project reference for projects that consume
X509Certificates and target NETStandard1.3.  Package refefences were
added to other crypto contracts to satisfy the closure walk done during
target framework validation.

Remove all of this when fixing https://github.com/dotnet/corefx/issues/6718


Commit migrated from https://github.com/dotnet/corefx/commit/4c7720dee1897bddd69be267d84261530a136c87
2016-03-07 13:00:12 -08:00
David Shulman 1e120fdd63 HttpResponseMessage.ReasonPhrase should not be null
Recent changes due to PR dotnet/corefx#3199 caused the `HttpResponseMessage.ReasonPhrase` property to be a null string if the HTTP server response only contained a statuscode but no description on the status line. The existing .NET Framwork behavior is to have empty string as the property value in that case.

Added a new test to validate this change.

Fixes dotnet/corefx#6721.


Commit migrated from https://github.com/dotnet/corefx/commit/19ec320403cd53ad0cba75c69a1a2c027ed867d5
2016-03-07 12:23:04 -08:00
stephentoub 38f7d19954 Update packages to rc3-23907
Commit migrated from https://github.com/dotnet/corefx/commit/baed539ebb753fefc91da9870ddeee72df0a6e14
2016-03-07 10:12:40 -05:00
stephentoub f3434408bc Update xunit.netcore.extensions to 00187
Commit migrated from https://github.com/dotnet/corefx/commit/3cfd81e7369628d052da6367b28c6f5b5839f55d
2016-03-03 22:06:40 -05:00
stephentoub 9b4473ede7 Upgrade package versions to rc3-23901
Commit migrated from https://github.com/dotnet/corefx/commit/55246a7fc60807d021fded5e333784956a662a51
2016-03-02 07:40:12 -05:00
Kamil Rytarowski 24a9cc2272 Mark disabled tests on Linux&OSX also disabled on NetBSD
Commit migrated from https://github.com/dotnet/corefx/commit/a9c7155de21cf11ff270a0f9d89cfc7cb82ff2ec
2016-03-01 02:48:19 +01:00
Eric St. John 19554adc35 Update buildtools and change validation framework
Update BuildTools to 1.0.25-prerelease-00180

Change validation framework moniker from dnxcore50 to
netstandardapp1.5.


Commit migrated from https://github.com/dotnet/corefx/commit/7c50768be0a2008480aa22ddb8038fdcb0e8039b
2016-02-29 14:43:26 -08:00
Eric St. John afdeaf78b0 Remove use of DNXCore from packages
This changes every package that used the DNXCore50 moniker to use a
NETStandard moniker instead.


Commit migrated from https://github.com/dotnet/corefx/commit/6008326984df7bddff751d0fec678ee29d821a59
2016-02-29 14:43:25 -08:00
Pallavi Taneja 3f93bc1c13 Fix packages issues due to the update
Commit migrated from https://github.com/dotnet/corefx/commit/9b8403541bfbd4b1956944723b68167ad12fbf29
2016-02-29 13:09:16 -08:00
Pallavi Taneja 38e2f4de64 Update the packages
Commit migrated from https://github.com/dotnet/corefx/commit/be7151b45a54577c2e28c56977408d7d61ed0ea9
2016-02-29 13:09:16 -08:00
David Shulman 855884a920 Release pinned buffers correctly for WinHttpHandler, WinHttpWebSocket
Both WinHttpHandler and WinHttpWebSocket use pinned buffers for receiving and sending data. The pinned GCHandle was being freed during the dispose of the WinHttpHandler or WinHttpWebSocket objects. The problem is that the buffer should not be unpinned until the async operation is done. It's possible for any async operation to be in flight (and where native code uses the buffer) when the object is explicitly or implicitly disposed.

This fix moves the ownership of the pinned GCHandle to their respective state objects (WinHttRequestState, WinHttpWebSocketState). These objects are strongly rooted and are not released until all async operations are completed and the WinHTTP handles are fully closed. That makes these state objects a safe place to own and free the pinned buffers.

Fixes dotnet/corefx#2508 and dotnet/corefx#6142


Commit migrated from https://github.com/dotnet/corefx/commit/a6eee4cec6bf663a030c8cd41f7a3fc3349b01e3
2016-02-28 08:06:32 -08:00
Stephen Toub 834f1fb44a Merge pull request dotnet/corefx#6389 from stephentoub/arg_names
Fix use of nameof with ArgumentException

Commit migrated from https://github.com/dotnet/corefx/commit/581d8ec923f57a33c43f3fbccdf47cd527010c47
2016-02-25 17:21:44 -05:00
David Shulman ccb02fce56 Fix memory leak caused by cycle reference in WinHttpRequestState
The fix made in PR dotnet/corefx#6285 for this memory leak turned out to be insufficient. The request handle object for the stream (SafeWinHttpHandle) was part of the strong root chain in WinHttpRequestState. And even when the WinHttpResponseStream object was finalized (implicit Dispose), the request handle was not finalized and thus leaks were happening.

To address this, the request handle object reference is now cleared from the WinHttpRequestState object (along with other object references) once the WinHttpResponseStream is created. WinHttpResponseStream then gets passed the request handle reference. Then normal finalizer rules can apply to both WinHttpResponseStream and the request handle. Once the request handle gets disposed (via finalizing), native WinHTTP will send a final status callback (HANDLE_CLOSING) and that is how the state object will then get unrooted and freed.

Tested this fix with WCF streaming scenarios and used WinDBG to verify the heaps.

There are future plans to improve this code via refactoring as part of dotnet/corefx#2501.

Fixes 5927.


Commit migrated from https://github.com/dotnet/corefx/commit/f2b47770d9014423ab830285b0fee47b75c44c02
2016-02-25 09:55:05 -08:00
Stephen A. Imhoff 811f903c18 Fix use of nameof with ArgumentException
Correct instances of new "ArgumentException(nameof(..." so names are in the correct parameter.  Where possible, I chose the resource string I felt best fit the situation.  Otherwise, I created a new entry (I'm assuming there's some extra work that needs to be done there, but don't know what it is offhand).


Commit migrated from https://github.com/dotnet/corefx/commit/368fdfd86ee3a3bf1bca2a6c339ee590f3d6505d
2016-02-25 10:35:40 -05:00
Eric St. John 5af200cd50 Rename "dotnet" to "NETStandard"
Fixes https://github.com/dotnet/corefx/issues/5707

We are changing the .NET packages to no longer use the ‘dotnet’, ‘dotnet5.x’, and ‘dnxcore50’ monikers.  This is thee first stage of the change for dotnet->netstandard.

The replacements are as follows

Old moniker | New moniker
----------------- | ------------------
dotnet5.x | netstandard1.y  (where y = x -1)
DNXCore50 | netstandardapp1.5
dotnet | netstandard1.3

To prepare for this change you can do the following to your project.json.  This change will require a recent build of NuGet or dotnet.exe and can be done prior to consuming the packages with the breaking change.  These packages will not work with DNX.

For a project targeting dotnet5.6
```
    "frameworks": {
        "netstandard1.5": {
            "imports": [ "dotnet5.6" ]
        }
    },
```

For a project targeting dnxcore50
```
    "frameworks": {
        "netstandardapp1.5": {
            "imports": [ "dnxcore50", "portable-net45+win8" ]
        }
    },
```

[tfs-changeset: 1578321]


Commit migrated from https://github.com/dotnet/corefx/commit/4435f9f2776ae007e05f4454675e56cf76a51975
2016-02-23 20:18:17 -08:00
David Shulman cc3124f083 Merge pull request dotnet/corefx#6291 from davidsh/readasync_fix
Response stream reads should return error for insufficient data

Commit migrated from https://github.com/dotnet/corefx/commit/0a0ea7fe57876ef47188dfe8bd76fae00e48f8e7
2016-02-21 18:03:10 -08:00
David Shulman 29ffaec8ad Address PR feedback
Commit migrated from https://github.com/dotnet/corefx/commit/6b4519800e1db707556a6730dc178e446e0836ba
2016-02-21 16:53:46 -08:00
David Shulman 7bdf953b91 Address PR feedback
Commit migrated from https://github.com/dotnet/corefx/commit/6e898758c6c03c44234ccc3ae398c432c97f5ff9
2016-02-21 16:45:39 -08:00
David Shulman 19962646b8 Response stream reads should return error for insufficient data
WinHttpResponseStream was not tracking the amount of data read when the response used 'Content-Length' semantics. So, if the amount of bytes read from the server was less than expected, we did not return an error. This was different behavior than .NET Framework.

Fixed WinHttpResponseStream so that it will track the total number of bytes read and compare it to the expected number of bytes if using 'Content-Length' semantics. Note that we don't do this checking if the HTTP request is a HEAD request. That is because the definition of that HTTP verb is to return headers "as-if" it was returning a real response body. So, the 'Content-Length' might be set but there is no response body for a HEAD request.

For cases of using 'Transfer-Encoding: chunked' semantics for the response body, there is already error checking at the lower HTTP layer in WinHTTP.

Fixes dotnet/corefx#6231.


Commit migrated from https://github.com/dotnet/corefx/commit/7f5d6b643996306062836a17ddad643fd7e40ff2
2016-02-21 15:36:38 -08:00
David Shulman 53aa563b67 Fix WinHttpHandler memory leaks
The WinHttpHandler was leaking a lot of objects in cases where an explicit Dispose was not done for the various HttpResponseMessage related objects. It was leaking because there was a cycle between the strong GCHandle of WinHttpRequestState and the objects contained within it.

To break the cycle, we now clear out object references within WinHttpRequestState that are no longer needed once the SendRequest phase is completed.

There was also a leak of a pinned GCHandle and related memory in WinHttpResponseStream. The free'ing of that allocated GCHandle was done in the Dispose(bool disposing) method. However, it wasn't being called when disposing=false (i.e. a finalizer). Since it is a pinned GCHandle, it needed to be freed in all cases.

Fixes dotnet/corefx#5927.


Commit migrated from https://github.com/dotnet/corefx/commit/a38ee461d2d93cc220953b3b6c4b405b188f6965
2016-02-21 11:41:42 -08:00
Christopher Costa b7275a6e29 Merge branch 'master' of https://github.com/dotnet/corefx into open_pkgs
Commit migrated from https://github.com/dotnet/corefx/commit/7df55caaad1d1e21866ec31b0e7161db9ae2179c
2016-02-19 14:21:24 -08:00
Justin Van Patten 0c5d4b54f3 Use nameof with MemberData tests
Commit migrated from https://github.com/dotnet/corefx/commit/2965a16a7660f90f45fbd880a430d7c5e9e086a0
2016-02-19 11:16:20 -08:00
Christopher Costa 8d91794cf8 Merge branch 'master' of https://github.com/dotnet/corefx into open_pkgs
Commit migrated from https://github.com/dotnet/corefx/commit/6c7226985ebea63f36d3d24e4c65e331a2e277c1
2016-02-19 10:56:24 -08:00
dotnet-bot b32ddb5d98 Deploy nameof throughout corefx in MemberData
Commit migrated from https://github.com/dotnet/corefx/commit/9c3156b9ada06b8e58ac53d48fc303500bf3e476
2016-02-18 23:58:15 -05:00
dotnet-bot 3184718282 Deploy nameof throughout corefx in exception construction
Mostly automated replacement of parameter name string literals with corresponding usage of nameof.


Commit migrated from https://github.com/dotnet/corefx/commit/396b41ddec99d01505c1bc4fa02fb0f0c5844990
2016-02-18 23:58:06 -05:00
David Shulman 52476494de Merge pull request dotnet/corefx#3199 from justinvp/winhttphandler_parseresponseheaders
Reduce allocations when parsing response headers in WinHttpHandler

Commit migrated from https://github.com/dotnet/corefx/commit/35f7ef05a8022358ec435152e7099d8263a4422a
2016-02-18 15:52:45 -08:00
Christopher Costa d95b14a3c4 Merge branch 'master' of https://github.com/dotnet/corefx into open_pkgs
Commit migrated from https://github.com/dotnet/corefx/commit/b70432898b7a00edb3303c0fbf4a1b98ebe442b4
2016-02-18 10:28:54 -08:00
stephentoub 95d7cc7534 Update packages to rc3-23818
Commit migrated from https://github.com/dotnet/corefx/commit/380a2ebf4a498f9ab0a819c71d8717377e601bfb
2016-02-18 07:28:09 -05:00
Justin Van Patten 1418f94145 Address PR feedback
Commit migrated from https://github.com/dotnet/corefx/commit/0aab2ac0feffe1ff3adce05bda7bf6a0e9a8baac
2016-02-17 11:07:14 -08:00
Christopher Costa 23ac6d7e8d Merge branch 'master' of https://github.com/dotnet/corefx into open_pkgs
Commit migrated from https://github.com/dotnet/corefx/commit/ddcd78f8f2ccd3debefefb5e10164d7a038bb7e0
2016-02-17 10:46:00 -08:00
Christopher Costa 881e218522 Add explicit OSGroup properties for OS specific packaging.
Commit migrated from https://github.com/dotnet/corefx/commit/5f6a78084d580225b558520c50ffb260e37147b8
2016-02-17 10:45:29 -08:00
Justin Van Patten 8e6b8806d3 Reduce response message allocations in WinHttpHandler
Reduce allocations associated with interop calls to
WinHttpQueryHeaders and parsing response headers.


Commit migrated from https://github.com/dotnet/corefx/commit/ce63f30fcc11eca57b13753effbb057ce6547688
2016-02-16 18:47:54 -08:00
stephentoub b6b5cfd1c0 Fix HttpClient diagnostic listener issues
- Fix Assert that was throwing in a background thread due to mistmatched type (it was looking explicitly for HttpResponseMessage rather than any type in its inheritance hierarchy, and CurlHandler uses a derived type).
- Update project.json package versions
- Unsubscribe the listener when done with it


Commit migrated from https://github.com/dotnet/corefx/commit/9a8d97852bcce9be0b4b6b5eff5ed87f4e36119e
2016-02-16 18:13:49 -05:00
nbilling 4401926ae3 Http request/response DiagnosticSource logging.
- Added logging to WinHttpHandler, CurlHandler, and HttpHandlerToFilter
  for HTTP request/response.
- Added functional tests for HttpClient (WinHttpHandler is exercised by
  these tests on desktop).


Commit migrated from https://github.com/dotnet/corefx/commit/edbd7ba720699bbe20753872ac430f0b3fdaf3a9
2016-02-16 15:57:17 -05:00
stephentoub 180fba592f Update packages to rc3-23816
Commit migrated from https://github.com/dotnet/corefx/commit/c2e6426b9b9494d5478f656396f4da5711e8729a
2016-02-16 11:05:43 -05:00
Christopher Costa 1df6eaae43 Open package conversions for corefx.
Commit migrated from https://github.com/dotnet/corefx/commit/030e29992f6be20ffb9d9d3e799118f3354bce22
2016-02-11 13:37:45 -08:00
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
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 30a19d4335 Update packages to rc3-23803
Commit migrated from https://github.com/dotnet/corefx/commit/d27ef6fb6092060e643c49a670e825e0cc01ff4d
2016-02-04 07:38:24 -05: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