Commit Graph
2312 Commits
Author SHA1 Message Date
Christopher Costa aab016344e Fat package conversions
Commit migrated from https://github.com/dotnet/corefx/commit/be08afd9701053f5f9369762db58b87c8ca9559f
2016-03-10 16:15:19 -08:00
Stephen Toub 4374bc6d33 Merge pull request dotnet/corefx#6799 from stephentoub/strip_content_headers
Remove content headers in CurlHandler when automatically decompressed

Commit migrated from https://github.com/dotnet/corefx/commit/1ca11068f411628cce053d9ef0295b80e7135d90
2016-03-10 14:54:54 -05:00
Stephen Toub 7be7352c24 Address PR feedback
Commit migrated from https://github.com/dotnet/corefx/commit/c6035bb1dbf5abc61c89fd93008416c3b900b1ff
2016-03-10 13:47:24 -05:00
stephentoub d5e591e45a Update packages to rc3-23910
Commit migrated from https://github.com/dotnet/corefx/commit/ab3948bfab039aac2afc1b521883425a171b982d
2016-03-10 09:37:40 -05:00
stephentoub edeb083709 Remove content headers in CurlHandler when encoded
WinHttpHandler removes the Content-Length and Content-Encoding headers when the content was automatically decompressed.  Do the same in CurlHandler.


Commit migrated from https://github.com/dotnet/corefx/commit/093dafe74d53c2222ff6f434107d49205cf7fa2f
2016-03-10 08:14:59 -05:00
Justin Van Patten 0d18ce8a1d HttpClient should not miss Set-Cookie response headers
Recent changes due to PR dotnet/corefx#3199 caused `HttpClient` on Windows to miss
`Set-Cookie` response headers when one of the header values was large
enough to cause `WinHttpQueryHeaders` to fail with
`ERROR_INSUFFICIENT_BUFFER` and advance the index.

This commit addresses the regression, by always setting the index
back to the index we want to retrieve.

Added a new test to validate this change.

Fixes dotnet/corefx#6737.


Commit migrated from https://github.com/dotnet/corefx/commit/f7e9f00aba800d2ea63e040deafcc7ee220331fc
2016-03-09 02:35:42 -08:00
Eric St. John 8cba463a08 Update crypto package dependency versions
System.Security.Cryptography.Algorithms, Cng, and X509Certificates are
now 4.1.0.  Update dependencies to ensure we get the right build.


Commit migrated from https://github.com/dotnet/corefx/commit/6e3e29dbec3705094a539b6b2dc863c5a8ee270c
2016-03-08 21:40:47 -08:00
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 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 4737c9c91c Address PR feedback
Commit migrated from https://github.com/dotnet/corefx/commit/ad33a55907ff347cb3cb052aafe0bdd63dd524c0
2016-03-04 19:08:06 -05:00
stephentoub f6386c1530 Disable SSLv2 and SSLv3 in CurlHandler
Commit migrated from https://github.com/dotnet/corefx/commit/2ec7d66814f0f2a789356590962d5198c9745912
2016-03-04 17:02:27 -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 579dd2cba9 Address more PR feedback
Commit migrated from https://github.com/dotnet/corefx/commit/15b2483a8d1ce5d495f75588ec2f1c0e3ae5bb2b
2016-03-03 12:21:10 -05:00
stephentoub b4708c3018 Add additional tests for IsBypassed and DefaultCredentials
And fixed a few other nits of feedback.


Commit migrated from https://github.com/dotnet/corefx/commit/bbef5f03fdbdf276851d82ce2c189b4ea1a4a826
2016-03-03 11:31:33 -05:00
stephentoub 0bd2c60135 Fix a few proxy-related issues in CurlHandler
- UseProxy's implementation was returning true by default but not actually honoring Proxy.
- WebRequest's DefaultWebProxy throws PlatformNotSupportedException, which should have been eaten to mean "use the default".


Commit migrated from https://github.com/dotnet/corefx/commit/9d8309a98d1165d4584d6f01245b9bf22a988ccb
2016-03-03 11:04:10 -05:00
stephentoub 6154fe40a2 Add HttpClientHandler test for proxies
We don't currently have any functional tests in the repo for using HTTP proxies.  This commit adds a very simple loopback GET request proxy server, just enough to verify that HttpClient does go through the specified proxy and pass credentials if requested.  If/when we get better infrastructure in place for this kind of thing, we can remove the proxy implementation and replace the test, but for now, this at least provides some automated verification cross-platform.


Commit migrated from https://github.com/dotnet/corefx/commit/db2d84b0bb4032ca21b8e7c9cfd96056ffddbab2
2016-03-03 08:23:57 -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
Eric St. John 7c5ac76238 Add support for new Xamarin frameworks
The latest build tools contains framework lists for two new Xamarin fxs:
  Xamarin.TVOS
  Xamarin.WatchOS

This adds placeholders for those frameworks so that they can support
the packages with inbox facades.


Commit migrated from https://github.com/dotnet/corefx/commit/baf425fa935f4ecd32712448be627604067cf1d3
2016-02-29 14:43:27 -08: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 38e2f4de64 Update the packages
Commit migrated from https://github.com/dotnet/corefx/commit/be7151b45a54577c2e28c56977408d7d61ed0ea9
2016-02-29 13:09:16 -08:00
Stephen Toub 84f73c7035 Merge pull request dotnet/corefx#6322 from justinvp/curl_headers
Reduce CurlHandler header parse allocations

Commit migrated from https://github.com/dotnet/corefx/commit/0d639c39f884de45f4325c6a9218b849b834a4fb
2016-02-25 20:50:32 -05: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
Justin Van Patten 34b6ba7acb Address PR feedback
Commit migrated from https://github.com/dotnet/corefx/commit/0291b44d95777cc3ea5521194a7f9c88be987959
2016-02-25 10:41:06 -08:00
Justin Van Patten fb984b77d4 Reduce CurlHandler header parse allocations
Use existing known header and reason phrase instances instead of
always allocating new strings and avoid unnecessary intermediate
string allocations.


Commit migrated from https://github.com/dotnet/corefx/commit/8aab95829d92185966ec9b79702101a2f167cd49
2016-02-25 10:41: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 Mellino 45736b2647 Fix compilation issues in various libraries when compiling without PCL reference assemblies
Commit migrated from https://github.com/dotnet/corefx/commit/e49f570bf97d0d81f3c461970155dc6cdd6aee8c
2016-02-24 18:29:17 -08: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 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
Stephen Toub 1d7305c701 Merge pull request dotnet/corefx#6269 from stephentoub/curl_errors
Improve several areas of CurlHandler error handling

Commit migrated from https://github.com/dotnet/corefx/commit/2eb9d0ebbf97456fdbf0e2fc118abc9d3fcaed7f
2016-02-21 09:06:08 -05:00
David Shulman 3c429d38af Address PR feedback
Commit migrated from https://github.com/dotnet/corefx/commit/e1847ee878dcd48ce66f330761f50a96e7e9b2b0
2016-02-20 20:32:45 -08:00
David Shulman 1127bdc413 Add more Http response stream tests
Building on PR dotnet/corefx#6250, added more response stream tests dealing with
invalid response body transfer semantics.


Commit migrated from https://github.com/dotnet/corefx/commit/42e5f468e86f7d62fe1c62194bfd473d30cf06b7
2016-02-20 19:21:10 -08:00
stephentoub 647a074469 improve several areas of CurlHandler error handling
While tracking down an issue related to exception handling in CurlHandler, I fixed up a few issues:
- On older libcurl's curl_multi_perform can return an error code that means to retry curl_multi_perform, but we were treating it as an actual error.
- Several places we were creating an HttpRequestException with a null inner exception, even if we had additional information about the cause.  I've fixed those call sites to include an appropriate inner exception.
- Cleaned up a few error messages.
- Fixed one place where I was overzealous in mapping exceptions to IOException


Commit migrated from https://github.com/dotnet/corefx/commit/1faaea86f0684452a874bcd58ce259763135c6b9
2016-02-20 07:25:58 -05:00
Stephen Toub f87bde7d1a Merge pull request dotnet/corefx#6250 from stephentoub/curlhandler_ioexception
Change CurlHandler to use IOExceptions for Stream failures

Commit migrated from https://github.com/dotnet/corefx/commit/4375b158e5d0498afb7edd1f3dc320bedbf9bf29
2016-02-19 21:26:21 -05:00
stephentoub 951b06b86c Add test for invalid response content length
Commit migrated from https://github.com/dotnet/corefx/commit/f9d488485d2bb7edeb43f918af1746d9ecb5e758
2016-02-19 17:32:27 -05: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
stephentoub 7365591fd7 Change CurlHandler to use IOExceptions for Stream failures
As with WinHttpHandler, CurlHandler wraps exceptions in HttpRequestException.  But WinHttpHandler switches to using IOException when sending exceptions out via Stream.Read/WriteAsync.  This change does the same for CurlHandler.


Commit migrated from https://github.com/dotnet/corefx/commit/e39e43a3809775c41a223ffa679e4f9e693676e1
2016-02-19 14:11:51 -05:00
Stephen Toub 26c1962d0d Merge pull request dotnet/corefx#6209 from stephentoub/nameof_exceptions
Deploy nameof throughout corefx

Commit migrated from https://github.com/dotnet/corefx/commit/1bd332f2e5f559c2eab276acb0d9e4256085ec2f
2016-02-19 14:10:39 -05: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
stephentoub 7385fb7563 Fix two build warnings
Commit migrated from https://github.com/dotnet/corefx/commit/499960b0345be841d0eb5bd174d68045a2c8d5f0
2016-02-19 10:42:25 -05: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
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
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