- On OSX, the read end of the pipe sometimes wakes up the poll
with a POLLOUT. Since we are interested in only reading on it,
scoping down to POLLIN prevents this from happening. Else we
attempt a read on it which fails
- CheckForCompletedTransfers was being unnecessarily called from the
socket callback. We are only interested in MSG_DONE after the socket
callback indicates removal. This will anyway wake up PollFunction which
calls CheckForCompletedTransfers. This race is also causing a seg fault
sometimes because curl_multi_socket_action has been called on an fd
that was getting cleaned up via curl_easy_cleanup (call sequence is
CurlSocketCallback --> CheckForCompletedTransfers --> EndRequest)
- Also removed some unnecessary CharSet attributes
cc: @stephentoub @davidsh @CIPop @SidharthNabar @pgavlin
Commit migrated from https://github.com/dotnet/corefx/commit/58178ce07fdf0e478467a77698c58fb6d1b4e866
In earlier version, a curl_multi_socket_action was performed everytime
the callback was invoked irrespective of whether there was activity on
the socket. This in turn causes more callbacks when libcurl tries to read
the socket but finds no data. This can be made more efficient by waiting
for activity on the socket and informing libcurl accordingly
- Fixed implementation of timer callback using an actual timer and handling
all possible values of timeout
- Fixed a bug in CheckForCompletedTransfers where a mismatch could occur
between the easy handle specified in the DONE msg
- Fixed the SEGV which was happening in earlier code due to recursive calls
to curl_multi_socket_action in the socket callback which was being invoked
synchronously in curl_multi_socket_action. This was causing a stack overflow
leading to a segfault
Commit migrated from https://github.com/dotnet/corefx/commit/d52dcd394fc174db629acd771d8529714e4dc4f4
This change updates the assembly versions of all of the corefx assemblies
as needed after we shipped stable versions. Assemblies with API differences
get a minor version bump. Assemblies with only bugfixes get a build version
bump.
In order to facilitate this I had to update the reference assemblies, so I took
the opportunity to port them all to the open.
[tfs-changeset: 1514419]
Commit migrated from https://github.com/dotnet/corefx/commit/40723b795917f2e98b64d45c17effb2546dd0cae
This bug revolves around a design limitations of the System.Runtime.WindowsRuntime System.IO.NetFxToWinRtStreamAdapter. Due to the way that the adapter works, the Windows.Web.Http layer is unable to "rewind" data in order to re-send it to the server for POST requests. Resending request entity-body data to the server is frequently needed due to authentication challenges.
The nature of this bug has resulted in a few common scenarios being broken for UWP (Windows 10 Store) apps that use System.Net.HttpClient or System.Net.HttpWebRequest. Even for simple content like StringContent (which is already buffered and not a stream, per se), we are unable to POST the data since the code paths were always using the limited NetFxToWinRtStreamAdapter.
The fix for this bug is multi-layered. In general, we try to avoid using the NetFxToWinRtStreamAdapter for the POST scenarios. For content that is ByteArrayContent (or derived classes), the data is already "buffered". So, we don't need to send it as a stream. We also check if the data has been buffered via the developer calling LoadIntoBufferAsync() explicitly and send it as a buffer. Then, if the data is not buffered, we check the stream itself. If it already supports the WinRT Stream interfaces, then we don't need to use the adapter. So, third-party devs can create compatible, multi-interface (.NET and WinRT) stream content to be POSTed.
[tfs-changeset: 1511754]
Commit migrated from https://github.com/dotnet/corefx/commit/e298b31e1da3dea3c3fd78f5f713b4659136484e
The stable versioned packages use an older codebase currently than the latest pre-release.
That codebase is still using SecureString in System.Private.Networking, but the dependency
was omitted since crypto is still pre-release but networking had to be marked stable for UWP.
This missing dependency was causing tests to fail.
Rather than just list the dependency I am moving these tests back to pre-release packages
for the System.Net contracts, since System.Net packages are under active development
it is better to have the tests running against latest than the stable bits.
Once we have newer versions published we'll update these tests to use those.
Commit migrated from https://github.com/dotnet/corefx/commit/5d9f9d4c6ea450366c7b70af6e6006a401284d14
This change modifies the build to consume the stable version where available.
This disables building the dowlevel packages since we shipped them once as stable and we're done.
From here on out, we'll only build the latest version (except for a servicing event, which would
be handled by syncing to a hash).
I can't rev the package versions in the normal way yet (by modifying the assembly version of the contents)
because that turned out to be too big of a problem to tackle in this change. Instead I added a
parameter to the task that calculates package versions to do the rev for anything that was
stable, but only when building the package itself, not when calculating the dependencies.
This has the downside of not permitting a dependency on a incremented pre-release version if we've
shipped a stable version, but that is a small point in time problem until I can rev the assembly
versions.
[tfs-changeset: 1508664]
Commit migrated from https://github.com/dotnet/corefx/commit/ee1ec2891c7c65b46fa9dfb078636be503bb2a60
- Avoid unnecessary allocations associated with the use of
ToUpperInvariant().
- Update tests to be more explicit about the ToUpperInvariant()
behavior.
- Minor cleanup (readonly field, remove unused usings & trailing
whitespace).
Commit migrated from https://github.com/dotnet/corefx/commit/a75896bd169b6481543d1a99d9d110a1c0339987
A PR from last month changed how GetHashCode() works. This ended up
breaking tests against the .NET Native build of System.Net.Http which
shares the same source code as CoreFx. So, reverting the change in
GetHashCode() and porting additional ToF tests to GitHub.
Commit migrated from https://github.com/dotnet/corefx/commit/2dcf6471f00954b86663f26f5ce45d8c3485017b
This change sets up the layout for having multiple test projects for
WinHttpHandler. It follows the current guidlines as well as working
within the BUILDTOOLS requirements of having ".Tests.csproj" for the
names of the projects.
Also, fixed up some cross-platform definitions in the solutions files
for Http and WinHttpHandler.
After this PR is done, we will be migrating a large set of http
functional tests to GitHub
Commit migrated from https://github.com/dotnet/corefx/commit/42d81c41175ab8832032a2a387b8dc58365604a9