Commit Graph
152 Commits
Author SHA1 Message Date
Hemanth Kapila bd0fcddf38 CurlHandler sending empty cookie
CurlHandler is sending an empty cookie unnecessarily. This commit fixes the behavior


Commit migrated from https://github.com/dotnet/corefx/commit/abc20ae4735e54c076e34795827af02ec7c9ce74
2015-10-22 11:27:54 +05:30
stephentoub 9418b556de Make HttpContentAsyncStream readable only internally
An instance of HttpContentAsyncStream is passed to HttpContent.CopyToAsync.  Currently HttpContentAsyncStream is both readable and writable, but reading is only meant for internal usage by CurlHandler's libcurl callbacks.  This change codifies that, such that CanRead now returns false and the public Read* methods throw NotSupportedException.  Internal reading is done via ReadAsyncInternal.


Commit migrated from https://github.com/dotnet/corefx/commit/c0fbe3c8e4d50bbf57acd330de8eac136d59c013
2015-10-20 15:50:44 -04:00
stephentoub 5f67919b29 Implement HttpContentAsyncStream.Write
WCF ends up trying to use Write as part of HttpContent.CopyToAsync implementations.  While that should be addressed separately to use WriteAsync, it's possible others are also using Write instead of WriteAsync, and today we throw NotSupportedException from Write.  So as to let this at least work, I'm implementing Write to delegate to WriteAsync.

I also noticed we were missing a FlushAsync implementation, so I've added one.


Commit migrated from https://github.com/dotnet/corefx/commit/b1bc8d48484f4104d0ec2c440544620b920b605f
2015-10-20 15:41:38 -04:00
bartonjs a768025131 Update all project.lock.json files
Built Windows_NT, Linux, OSX with /p:LockDependencies=true.

CoreFX beta-* => 23419
xunit.netcore.extensions => 00107


Commit migrated from https://github.com/dotnet/corefx/commit/a14b22705df253508bd5f2dab0407bd2c7e4d639
2015-10-19 16:00:44 -07:00
Eric St. John 8cd3109d56 Switch from using "dotnet" to using "dotnet<generation>"
All projects that previously used dotnet have been updated to specify the appropriate generation of the surface area they depend on or in the case of desktop inbox contracts, the generation that includes the set of platforms they can support.

Now all packages contain all generations of API that they have ever shipped.

In doing this I needed to change how we determine package version.  Before we ensured all assemblies would have the same version and used that.  Now we choose the max.

Additionally I needed to change how we chose which asset to use for netcore50 when the dotnet asset was obscured by a placeholder for a previous netcore release (eg System.Runtime will have placeholders for Win8 since it was inbox there).  To do this I wrote a task that uses nuget to evaluate the package assets with and without the placeholders.  In this way it chooses the "best" dotnet implementation and reference assembly to use for netcore50.

This new model made my old MSBuild-based validation impossible to carry forward, so I wrote better validation in a task that actually uses Nuget's asset resolution algorithm.  This uncovered many existing issues in packages that I have cleaned up.  The validation algorithm could use some polish but its working now.  Perf is not great, package build went from 15s to ~2 minutes.  I'll work on this some more by making it incremental (input: nuspec, output: marker created on success).  Profiling shows that most of the time is spent in calling the nuget APIs.  I'll see if I can reduce some of this with caching for things that don't change (eg: RID graph).  Ultimately I think its a reasonable tradeoff for the types of bugs I can find this way.

[tfs-changeset: 1539216]


Commit migrated from https://github.com/dotnet/corefx/commit/0931c347eb836c9da94d0d5ff9ad7a14403b9738
2015-10-18 21:12:23 -07:00
David Shulman 4640c3cefb WinHttpHandler uses async WinHTTP patterns
This is a large PR and addresses work item dotnet/corefx#3000. I apologize for not being able to structure it in a series of smaller commits.

The bulk of this PR is switching WinHttpHandler to use the async pattern of calling WinHTTP APIs. This involved a significant restructuring of the code. As part of that, I split up the large WinHttpHandler class into multiple, smaller, helper classes.

While the intent of using async WinHTTP calls is better performance and cancel-ability, this PR has not been fully optimized yet. Due to the schedule of RC1 code complete next week, it's important that this PR get in and get mileage on it in the next few weeks.

There are several TODO items that will be done in later PR's. There is still work being tracked in dotnet/corefx#2165 for various follow-up items. For example, re-conciling the best SafeHandle pattern to use for WinHTTP between WebSockets.Client and WinHttpHandler.

I'm currently using a simple Debug.WriteLine for verbose debug logging which can be turned on/off via environment variable. I plan to switch this to System.Net ETW trace loggers in the next commit and/or PR. But the logging has proved very useful in diagnosing issues.

Please provide feedback. Depending on the feedback, some of it will be marked as follow-up items for future PRs.


Commit migrated from https://github.com/dotnet/corefx/commit/d8e5371a5d0f9f4bb3aa85127cb78adf89dde1fb
2015-10-16 13:33:35 -07:00
Stephen Toub 88310b6bc9 Merge pull request dotnet/corefx#3806 from kapilash/rewindable
PreAuthenticate fix

Commit migrated from https://github.com/dotnet/corefx/commit/625b9bd2dcb8809455cddaf0c882d87bdfcc682c
2015-10-14 12:48:15 -04:00
Hemanth Kapila 3b56433cf5 PreAuthenticate fix for CurlHandler
When CURLOPT_HTTPAUTH is set to 'any', libcurl will always try to make more than one call to figure out the
right authentication scheme needed by the server. This breaks the behavior when PreAuthenticate is set to true.
The fix is to iterate over available schemes and set the auth-scheme flags to only those that are available.
Also, while updating the CredentialCache, we ignore ArgumentException (raised when the cache contains the given url and scheme pair)
Throw exception when network credentials are different for auth schemes


Commit migrated from https://github.com/dotnet/corefx/commit/17fdc686de07b9f9711956eea25e6c0c9042cd17
2015-10-14 14:45:43 +05:30
David Shulman 02c17e7794 Re-enable test of *Nix
HttpContentTest.ReadAsStringAsync_SetInvalidCharset_ThrowsInvalidOperationException
can be re-enabled due to fixes in the CoreCLR for System.Text.Encoding on
*Nix.  This fixes dotnet/corefx#3343.


Commit migrated from https://github.com/dotnet/corefx/commit/58b40540cf56a43469ccb1cee1323cfc392aa4aa
2015-10-13 18:40:08 -07:00
stephentoub 0f3bc08cf0 Address PR feedback
- Ensure CurlException in addition to IOException is wrapped in an HttpRequestException
- Consolidate such wrapping to one place
- Update a comment
- Check for already disposed in Dispose


Commit migrated from https://github.com/dotnet/corefx/commit/349edc9f77c2aedb36f54a0e971219a733a27c64
2015-10-12 15:57:14 -04:00
stephentoub 74361348bc Improve perf for synchronous CopyToAsync
It's common for the HttpContent to synchronously give back a Task from CopyToAsync and for CopyToAsync have synchronously initiated a WriteAsync.  In such cases, the previous commits would have made that asynchronous by scheduling it in a Task, which means that it's more likely a subsequent ReadAsync from a libcurl callback would end up having the ReadAsync complete asynchronously, which is expensive due to the pausing infrastructure.

This change removes the asynchronous scheduling of CopyToAsync, making it more likely that synchronously available data will be available by the first ReadAsync call.


Commit migrated from https://github.com/dotnet/corefx/commit/52aace9364de641030affa8c1c6a5d24526a65ae
2015-10-12 15:48:01 -04:00
stephentoub 7e62766fa3 Fix CurlHandler to only wrap IOExceptions
When a failure occurs, we're currently wrapping all exception types except for HttpRequestException.  To match the desktop and WinHttpHandler behavior, we should only be wrapping IOExceptions.


Commit migrated from https://github.com/dotnet/corefx/commit/993e5f482a6ebbf9c1a19092dd9b93d70008f812
2015-10-12 15:48:00 -04:00
stephentoub eab8ad6e54 Update CurlHandler to use HttpContent.CopyToAsync
To get a request content stream, CurlHandler currently uses the
HttpContent's ReadAsStreamAsync, and when libcurl needs to rewind the
stream, CurlHandler seeks on the stream.

Unfortunately, it turns out ReadAsStreamAsync isn't actually intended to
be used by handlers in this manner, and as such there are some
deficiencies that lead to correctness problems.  For example, some of the
WCF HttpContent-derived types return non-seekable streams from
CreateContentReadStreamAsync and thus from ReadAsStreamAsync.  This means
that, using ReadAsStreamAsync, if we need to resend a request, we need to
call ReadAsStreamAsync again. But ReadAsStreamAsync doesn't do the same
_contentConsumed check that SerializeToStreamAsync does. That means if the
content is actually a StreamContent, whose CreateContentReadStreamAsync
just does ```return Task.FromResult(new
ReadOnlyStream(this._content));```, and if the stream is non-seekable,
then we'll end up getting back the "new" stream but that's already had its
content consumed, and we won't know. We can't even try to do an object
reference comparison, because StreamContent is wrapping the returned
stream in a new ReadOnlyStream instance each time.  The recommended
approach for handlers is to use HttpContent.CopyToAsync.

CopyToAsync is a push-based model, letting the HttpContent write to a
target stream.  CurlHandler/libcurl have a pull-based model, with
CurlHandler ReadAsync'ing from the request content based on callback from
libcurl.  To straddle this divide, this commit adds a specialized
push/pull adapter stream that let's CurlHandler effectively read from the
pushing source.  If/when libcurl asks to rewind, the stream resets itself
by doing a new CopyToAsync operation.

This revised approach does incur more costs, however care has been taken
to try to minimize those overheads as much as possible, and the change is
necessary for correctness.


Commit migrated from https://github.com/dotnet/corefx/commit/3678490e2d53d9a9fca6c7e50daadd7152b836f7
2015-10-12 15:47:59 -04:00
stephentoub ba9fea449f Reorganize src\Common\tests
Our common tests folder has gotten a bit unwieldy in its organization.  This change simply moves files around to better map to how src\Common\src is organized.  Files are now stored in a path based on functionality/namespace.

I mostly kept groups of functionality together and did not attempt to reorganize at that level, e.g. I moved the src\Common\tests\System.Xml.XPath\ folder to be src\Common\tests\System\Xml\XPath\ and did not further reorganize all of the folders/files it contains.  Such cleanup can be done separately on each individual area.

Some of the files also need to be cleaned up internally, e.g. the namespace (or lack thereof), so I put such things in a path that I thought made sense even if it differs from the current namespace in the file; I wanted this change to be relatively simple and just be about moving files around to clean up the main hierarchy.


Commit migrated from https://github.com/dotnet/corefx/commit/9a5546c439f7700d3462564678aa4206c7fbf4f1
2015-10-11 15:44:39 -04:00
stephentoub 4d0f06a262 Re-enable HttpClient encoding tests on Unix
Commit migrated from https://github.com/dotnet/corefx/commit/6f8fb64d2a994dc120b1ab539d0a2e93030c6663
2015-10-09 16:14:25 -04:00
Stephen Toub a5e18b5444 Merge pull request dotnet/corefx#3720 from stephentoub/fix_curlhandler_scheme_checking
Remove unnecessary scheme check in CurlHandler

Commit migrated from https://github.com/dotnet/corefx/commit/f862cf044c0246635dd5c69e41ec547d32639eb1
2015-10-09 08:10:32 -04:00
David Shulman e45cc6afdf Add test to verify default values for HttpClientHandler
Ported this test to GitHub.

Note that the change in default values between Desktop and CoreFx for two
of the properties is an "intentional, improving, change".


Commit migrated from https://github.com/dotnet/corefx/commit/7aa4a1f71640351230943fa06f51602cb2c07cb3
2015-10-08 15:35:10 -07:00
David Shulman b7b2027a1e Add more HTTP tests
Ported some missing tests to GitHub. Cleaned up some of the existing
tests.


Commit migrated from https://github.com/dotnet/corefx/commit/870810a3a50b41acc088a907dd7a5ea88a214ec8
2015-10-08 14:05:35 -07:00
stephentoub 0f97bdcb18 Remove unnecessary TODO in CurlHandler
This is handled by HttpClient.


Commit migrated from https://github.com/dotnet/corefx/commit/37d4e0f08ee24839be1475a07d236e4a820ad09c
2015-10-08 11:12:17 -04:00
stephentoub 9db961568b Remove unnecessary scheme check in CurlHandler
CurlHandler is explicitly checking to ensure that the request URI scheme is either http or https. HttpClient already does this check before getting to this point, WinHttpHandler doesn't do the duplicative check, and even if a bad scheme sneaks in, our subsequent usage of libcurl will enforce that only http/htps are used. Replacing the check/exception with an assert.


Commit migrated from https://github.com/dotnet/corefx/commit/287baeadf7348f0c671a8bcd07842977935de215
2015-10-08 10:43:18 -04:00
David Shulman d27860b628 Add more tests for System.Net.Http library
Ported more HTTP related tests.  These tests focus mostly on POST
scenarios mixed with authentication, pre-authentication, and the
"rewind-ability" of content if it needs to be re-POST'd due to AUTH
challeges by the server.

Added a new HttpTestServers2 class to Common/tests/System/Net. This is a
point-in-time thing as we improve the test infrastructure capability. In
particular, we are moving away from the use of the "httpbin.org" server.
Our new networking test server that we are bringing up has more features
than httpbin.org. It can support all the main HTTP verbs when doing "echo"
of request headers. It includes a "Content-MD5" HTTP response header. This
contains a hash of the response body. This makes it easier to validate the
returned payloads. The "httpbin.org" server also has a bug where it does
not properly echo chunked upload headers which was causing issues when
trying to port these tests.

I did not change other networking tests still using "httpbin.org" and the
Common HttpTestServers class. I will be doing that later as we finalize
the test infrastructure.


Commit migrated from https://github.com/dotnet/corefx/commit/f14225a7355bdae2468bb3c28562da0a0976f206
2015-10-07 10:49:56 -07:00
Stephen A. Imhoff 9fb3950e79 Remove custom error checking from System.Net.Http, per dotnet/corefx#516
- Use ShouldNotBeInvokedException to explicitly state some callbacks
should not be invoked.


Commit migrated from https://github.com/dotnet/corefx/commit/f333a31abbe1de0feb8a79b348aedb6e21d9c67e
2015-10-03 10:24:55 +09:00
stephentoub 613a87d035 Add explicit 0 index args to Array.Copy usage
Array.Copy is implemented to work with any System.Array, not just T[].  When Array.Copy(sourceArr, destArray, length) is used, it delegates to Copy(sourceArr, sourceIndex, destArray, destIndex, length), and as such needs to query for the lower-bound of the supplied arrays, since although a T[] in C# always has a lower-bound of 0, an arbitrary Array may not.  Given this, when calling Array.Copy, instead of calling Array.Copy(src, dest, length), it's slightly more efficient to just call Array.Copy(src, 0, dest, 0, length), avoiding the need for the GetLowerBound calls made while delegating to the 5-arg version.

I noticed one occurrence of this in some code I was looking at, and while fixing that, I fixed all of them across corefx\src.


Commit migrated from https://github.com/dotnet/corefx/commit/979026e435672e611e3f6e0647c873aa96ccc684
2015-10-02 13:56:48 -04:00
Ian Hays 0f8197a86c Update CoreFX to xunit 2.1.0
Commit migrated from https://github.com/dotnet/corefx/commit/87b48c58936d66fcb201b3a8ad0961fa055f23b9
2015-10-01 19:56:49 -07:00
Hemanth Kapila 4f26738d30 CURL Handler redirect fixes
This commit fixes the following issues  in CurlHandler w.r.t following URI redirection

* Ensure that the credentials are nullified at the right place. We should not set username and/or password to null unnecessarily. libcurl differentiates between unset UserNames/Passwords and null user names/passwords

* Ensure that libcurl follows only HTTPS uri if the original request was for a HTTPS URL.

* Ensure that libcurl follows only a HTTPS or a HTTP uri if the original request was for a HTTP URL.

* Ensure redirect results in a proper response code

* For all requests, limiting protocols to http and https


Commit migrated from https://github.com/dotnet/corefx/commit/7c59e04ce8b26887c386fc3045882196a3142b36
2015-10-01 19:34:28 +05:30
David Shulman faecfe5a93 Merge pull request dotnet/corefx#3554 from davidsh/more_http_tests
Add more HTTP tests

Commit migrated from https://github.com/dotnet/corefx/commit/1338765c9d6be95506edcdf2dab00f4c5d9153d2
2015-09-30 20:49:57 -07:00
David Shulman a6002ce802 Add more HTTP tests
* Add more tests ported from the internal ToF tests.
* Cleanup existing tests to be consistent in style and format as it has
drifted due to many different people working on the tests.
* Disposing the HttpClient object will dispose the handler as well so we
don't need multiple 'using' statements unless we are explicitly testing
dispose ordering semantics.


Commit migrated from https://github.com/dotnet/corefx/commit/ad55c1d5685afc4009cb2481fcc7c5e4f4a551f8
2015-09-30 20:11:07 -07:00
bartonjs a52f41057c Update all CoreFx package references to 23328 build.
`build.cmd /p:LockDependencies=true` was the start of this change, but some errors with xunit build numbers led to all xunit upgrades being reset back to what they had in master.

project.json changes:
* System.Net.Security\src Switch off of explicit beta versioning, use the same baseline as everyone else.  The S.S.C.Algorithms explicit upgrade is no longer required.
* System.Net.Requests\tests didn't build.  Looking at the project.lock.json change, it appeared that a System.Net.Http reference was lost, restored it.
* System.Net.Http\tests didn't build. Looking at the project.lock.json change, it appeared that a System.IO.FileSystem reference was lost, restored it.
* System.Net.WebSockets.Client\src didn't build. Looking at the project.lock.json change, it appeared that a System.Collections (4.0.10) reference was lost, restored it.
* System.Diagnostics.TextWriterTraceListener\tests needed the runtime reference to load the correct System.Diagnostics.TraceSource binary.


Commit migrated from https://github.com/dotnet/corefx/commit/cec3a0f2db542bfa9d9c56bf988d966eacc35ad9
2015-09-29 11:40:37 -07:00
Stephen Toub 02eb1e1b80 Merge pull request dotnet/corefx#3333 from stephentoub/fix_curl_assert
Remove faulty assert from CurlHandler.CurlResponseStream

Commit migrated from https://github.com/dotnet/corefx/commit/f92cf14f08e1636072b18ac3c46c697c6c390ed4
2015-09-22 09:30:28 -04:00
Hemanth Kapila e2dc229d7b Merge pull request dotnet/corefx#3328 from stephentoub/supportsredirectionconfig
Implement CurlHandler.SupportsRedirectConfiguration

Commit migrated from https://github.com/dotnet/corefx/commit/5a4eb8afb6393a37043ba82f5dbbbd9c3cc54151
2015-09-22 18:55:25 +05:30
Stephen Toub 4db6ddbde9 Merge pull request dotnet/corefx#3360 from Clockwork-Muse/System.Net.Http_ProjectFile
Correct broken System.Net.Http solution file.

Commit migrated from https://github.com/dotnet/corefx/commit/6f6c12c3be1cb6e6148bc05ea7e6cafaddd164ff
2015-09-22 08:30:00 -04:00
Hemanth Kapila dd0d1f999d Merge pull request dotnet/corefx#3307 from kapilash/use_default_creds
Allow UseDefaultCredentials property for HttpClientHandler on unix

Commit migrated from https://github.com/dotnet/corefx/commit/237b722c2035a5fd51e41b269a62b8df1286f945
2015-09-22 12:13:09 +05:30
Stephen A. Imhoff f01a8e122e Correct broken System.Net.Http solution file.
Commit migrated from https://github.com/dotnet/corefx/commit/039da4e1f033df584540736a3f9555b9383a3c95
2015-09-22 14:18:27 +09:00
David Shulman 9d997536f4 Port additional System.Net.Http tests to CoreFx
Added more http tests to open source from the original internal ToF tests. Some of
the tests should be refactored in the future to avoid Assert'ing multiple
logical things.

Fixed up test namespaces for System.Net.Http and
System.Net.Http.WinHttpHandler.


Commit migrated from https://github.com/dotnet/corefx/commit/e5a017cb6ca01e99b1f1462298bc0cbf60c06ee0
2015-09-21 11:48:34 -07:00
Christopher Costa cdfa624a04 XPlat packaging
Converts libraries to use platform specific implementations in packages.

[tfs-changeset: 1526941]


Commit migrated from https://github.com/dotnet/corefx/commit/b27061014ebd18d83031039f31721afa35d4612c
2015-09-20 11:57:30 -07:00
stephentoub 97c7401c5d Remove faulty assert from CurlHandler.CurlResponseStream
CurlResponseStream.VerifyInvariants has an assert that assumes that if the stream has been disposed, it must have also completed.  But since this stream is exposed publically, it's possible for consuming code to Dispose of the stream before the request has finished, violating the assert.  In such a situation, a subsequent attempt to transfer data to the response stream will fail and cause the request to be aborted as desired, cleaning up resources (there are probably some opportunities here for some optimizations to handle this case, but that can be explored later.)

This commit just removes the bad assert.


Commit migrated from https://github.com/dotnet/corefx/commit/cfc3f755af4302973d7455fdb86182822c467bdb
2015-09-20 10:26:14 -04:00
Hemanth Kapila 65ebeca3f6 HttpClientHandler.UseDefaultCredentials to be made a no-op
HttpClientHandler on windows securely uses logged-in user's credentials
when UseDefaultCredentials is set to True. This is achieved via winHttp.
Libcurl does not provide such functionality, so making this a no-op.


Commit migrated from https://github.com/dotnet/corefx/commit/60aa75f55e9149176a94e5ec5c3773688fcce5be
2015-09-20 12:25:44 +05:30
stephentoub 791179fdf2 Add MaxRequestContentBufferSize tests to lock in behavior
Commit migrated from https://github.com/dotnet/corefx/commit/e25c5020fd9e327dfdb7baffb9d772967b28abc9
2015-09-19 20:29:06 -04:00
stephentoub a22cd97af4 Implement CurlHandler.SupportsRedirectConfiguration
It does. Return true.


Commit migrated from https://github.com/dotnet/corefx/commit/d91900297d6430c6057abed2e513287d978fa8ec
2015-09-19 20:21:32 -04:00
stephentoub 0ba31ef907 Implement HttpClientHandler.MaxRequestContentBufferSize on Unix
Changed to match behavior on Windows (get returns 0, set throws PlatformNotSupportedException).


Commit migrated from https://github.com/dotnet/corefx/commit/dd7463ada578331d9b1ee5e25ee7e9998d6bf42a
2015-09-19 20:09:29 -04:00
Jonathan Miller fb3803dfe9 Finishing up PAL'ing Unix\libc (non-networking and crypto)
PInvoke calls


Commit migrated from https://github.com/dotnet/corefx/commit/f8fd4b7ff731cd8951e6da0bb70ca206533866bb
2015-09-17 13:05:29 -07:00
Wes Haggard a0d524ea1c Merge pull request dotnet/corefx#3177 from akoeplinger/update-dnx
Update build to use DNX beta7 instead of beta5

Commit migrated from https://github.com/dotnet/corefx/commit/34e8271eae1e8cbda5389f6b152c1f27994ca6c2
2015-09-16 10:34:50 -07:00
Stephen Toub 8dc75dfdc7 Merge pull request dotnet/corefx#3265 from nguerrera/shim-work
Increase native compilation warnings and fix the fallout

Commit migrated from https://github.com/dotnet/corefx/commit/77b35ab922586c69b51f4df66f3d8149f940e1a7
2015-09-16 13:15:56 -04:00
Nick Guerrera 23277810e6 Increase native compilation warnings and fix the fallout
We were using -Wall but now use -Weverything and opt out of only
a handful of issues such as C++-98 compat, which we don't need.

The most notable impact is that the compiler now catches
narrowing implicit conversions, which was also the primary
motivation for doing this now as there was known debt in our
unsupervised usage of 64-bit types for sizes.

We now assert on bad buffer sizes *and* retain full checks in
release builds to be completely defensive against overflow.

We now use int32_t for scratch buffer sizes. int64_t remains for
file offsets and uint64_t remains for memory mapped files, but
int32_t for scratch eliminates a bunch of managed casts and
therefore makes it easier to reason about overflow prevention.

INT32_MAX is also the most portable limit on these buffer sizes
because the behavior of functions like read is only implementation
defined when the input size is greater than SSIZE_MAX and ssize_t
is int32_t on the lowest common denominator of modern platforms.

Enums corresponding to platform values are now enum X : T instead
of enum class X : T. The PAL_* names are descriptive enough without
scoping and the implicit conversion to raw integer is actually helpful
to avoid a bunch of casts, which are otherwise needed to interop with
the corresponding native API.


Commit migrated from https://github.com/dotnet/corefx/commit/648c01d69fba8d23750122d9823f53257785c8ca
2015-09-16 09:15:33 -07:00
Hemanth Kapila 1cd1a63716 Redirect handling for cookies and creds
This fix realigns CurlHandler with WinHttpHandler w.r.t Redirect handling.
When redirect is detected, we clear the credentials if the credentials were originally provided as NetworkCredentials Otherwise we use the
forwarding URI to get the new set of credentials.
Like wise, in case of redirects, we get the cookies again from the cookieContainer

In addition, this commit also collects the cookies from the response header


Commit migrated from https://github.com/dotnet/corefx/commit/5d6c82b64c317a6e7e724778affb0f571acdcb2e
2015-09-16 09:39:48 +05:30
Alexander Köplinger 3e20a867b2 Update build to use DNX beta7 instead of beta5
The corefx build used an older beta5 version of DNX which hardcoded the path to bash in dnu, breaking the build on FreeBSD.
Updating DNX to the latest "stable" beta7 release fixes this.

After updating I noticed a few test projects didn't build anymore as they were missing some dependencies in project.json, added those.

Fixes dotnet/corefx#3173


Commit migrated from https://github.com/dotnet/corefx/commit/6df77fdbb6cf8e0d35a3074bb325f7810085daa3
2015-09-16 02:12:26 +02:00
Jonathan Miller 9e25edd8d1 Moving more Unix\libc function calls over to the PAL layer
along with fixing up the Interop calls for the switched
functions.


Commit migrated from https://github.com/dotnet/corefx/commit/aed4a23f36ace07e7f5f33bf5a28808fd215fea6
2015-09-11 14:09:37 -07:00
stephentoub b1d72f56c2 Address PR feedback
Commit migrated from https://github.com/dotnet/corefx/commit/9f628cfa67e6c481b76c03aa8c9c50472df1863d
2015-09-10 08:40:32 -07:00
stephentoub 54c0b5401d Add tests for different request streams
Commit migrated from https://github.com/dotnet/corefx/commit/f9d1b3c47d4ff46afaa44fdb0eede63712e92164
2015-09-09 10:00:25 -07:00
stephentoub 4cf187c144 Ensure TransferEncodingChunked is set to true for non-seekable request streams
Commit migrated from https://github.com/dotnet/corefx/commit/cc1f2fe2f5743918960e72ec5e13c77fa7bca61b
2015-09-09 10:00:22 -07:00