Commit Graph
2312 Commits
Author SHA1 Message Date
Geoff Kizer 3c234c01fc implement SETTINGS_MAX_CONCURRENT_STREAMS handling
Commit migrated from https://github.com/dotnet/corefx/commit/06f67c0ed6240b1f886334aeb4c1a34fc29582a9
2018-12-17 16:03:26 -08:00
Geoff Kizer 3b7e8854b4 respect SETTINGS_INITIAL_WINDOW_SIZE and rework SendAsync code structure
Commit migrated from https://github.com/dotnet/corefx/commit/04fb2722d89a65ce92d8caa90e1e39a0ab4c3d5f
2018-12-17 13:42:31 -08:00
Stanislav Ushakov 232de53a7c Fixed suppressed XML documentation errors (dotnet/corefx#34020)
* Fixed XML documentation tags for CoreFx.Private.TestUtilities

* Fixed XML documentation tags for System.Diagnostics.Process

* Fixed XML documentation tags for System.ComponentModel.Composition

* Fixed XML documentation tags for System.ComponentModel.Primitives

* Fixed XML documentation tags for System.ComponentModel.TypeConverter

* Fixed XML documentation tags for System.Data.Common

* Fixed XML documentation tags for System.Data.SqlClient

* Fixed XML documentation tags for System.Diagnostics.PerformanceCounter

* Fixed XML documentation tags for System.Diagnostics.StackTrace

* Fixed XML documentation for System.Diagnostics.TraceSource

* Fixed XML documentation for System.IO.Compression.ZipFile

* Fixed XML documentation for System.IO.Compression

* Fixed XMl documentation reference according to review notes

* Fixed XML documentation tags for System.IO.MemoryMappedFiles

* Fixed XML documentation tags for System.IO.Pipes

* Fixed XML documentation tag for OSX interop in System.Diagnostics.Process

* Fixed XML documentation tags for CoreFx.Private.TestUtilities for Unix

* Fixed XML documentation tags for System.Linq.Expressions

* Fixed XML documentation for System.Linq.Parallel

* Fixed XML documentationt ags for System.Linq

* Fixed XML documentation tags for System.Management

* Fixed XMl documentation tags for System.Net.Http (left CS1573)

* Fixed XMl documentation tags for System.Net.Mail

* Fixed XML documentation tags for System.Net.NameResolution

* Fixed XML documentation tags for System.Net.Primitives - added T prefix for Socket as Primitives do not reference System.Net.Sockets

* Fixed XML documentation tags for System.Net.Sockets

* Fixed XML documentation tags for Unix interop files

* Fixed XML documentation tags for System.Net.Http (Unix)

* Fixed XML documentation tags for PlatformDetection.Unix.cs according to review notes

* Fixed XML documentation tags for OSX interop

* Ignore CS1574 for System.Linq as there is no ConcatIterator{TSource}.ToList for uap.

* Fixed XML documentation tags for FreeBSD interop

* Fixed XML documentation tags for System.Net.WebSockets

* Fixed XMLm documentation tags for System.Transactions.Local

* Fixed XML documentation for System.Security.Principal.Windows

* Fixed XML documentation for System.Drawing.Common

* Fixed XML documentation for System.Net.NetworkInformation

* Fixed XML documentation tags for System.Private.XML (left CS1589)

* Fixed XML documentation tags for System.Security.Cryptography

* Fixed XML documentation for System.Runtime.WindowsRuntime

* Fixed XML documentation tags for System.Security.Cryptography.Xml

* Fixed XML documentation tags for System.Security.Cryptography.Primitives
CS3016 was added by mistake as part of dotnet/corefx#32934 so I removed it.

* Fixed XML documentation tags for System.Linq: added M to ToList method as it is not accessible by uap builds.

* Fixed XML documentation tags for System.IO.FileSystem

* Fixed XML documentation tags for System.Security.Cryptography.*

* Fixed XML documentation for System.IO.Ports

* Fixed XML documentation tags for System.Private.Reflection.Metadata.Ecma335

* Fixed XML documentation tags for System.Windows.Extensions

* Fixed XMl documentation tags for System.Console

* Fixed XML documentation for System.IO.FileSystem.DriveInfo

* Fixed XML documentation tags for System.Runtime.Extensions

* Fixed XML documentation tags for System.Drawing.Primitives.
Left CS1589 as there is no 'doc\KnownColor.uex' file.

* Fixed XMl documentation for System.Runtime.WindowsRuntime.
Had to add M prefix to 'Windows.Foundation.IAsyncAction' as Windows.Foundation is not accessible at compilation time.

* Fixed XML documentation tags for System.Private.Xml

* Fixed XML documentation tags for System.Private.Reflection.Metadata.Ecma335
Had to add a prefixes to: 'T:System.Collections.Immutable' and 'M:Enumerable.ToArray{TSource}' as they are not available for uap at compilation time.

* Fixed XML documentation tags for System.Net.WebSockets.WebSocketProtocol

* Fixed XML documentation tags for System.Net.WebSockets.WebSocketProtocol

* XML documentation tags fixes: changes after review.


Commit migrated from https://github.com/dotnet/corefx/commit/f7539b726c4bc2385b7f49e5751c1cff2f2c7368
2018-12-17 09:15:22 -08:00
Geoff Kizer 2d8dabc6b0 address PR feedback
Commit migrated from https://github.com/dotnet/corefx/commit/671409a8a845f69b5120cab24e44ca60d87355dc
2018-12-15 12:32:48 -08:00
Geoff Kizer 09bf3552bf improve SETTINGS handling and other small changes
Commit migrated from https://github.com/dotnet/corefx/commit/c260486e788ef057909ff4dde813522a5816d2b1
2018-12-13 16:38:08 -08:00
Geoff Kizer 08cdb19715 add missing ConfigureAwait
Commit migrated from https://github.com/dotnet/corefx/commit/cb19e0dc38aa3b02fa8a4b145c908370aa41f53f
2018-12-13 13:12:50 -08:00
Geoff Kizer 3fb8ce8bf0 implement outbound flow control
Commit migrated from https://github.com/dotnet/corefx/commit/a43253650f18a75383707a3a62fe761332317c85
2018-12-12 18:47:49 -08:00
Geoff Kizer 47b90c25e3 Merge pull request dotnet/corefx#34016 from geoffkizer/http2responsewindow
HTTP2: Implement inbound flow control support

Commit migrated from https://github.com/dotnet/corefx/commit/95406c508940bbb42d7de2eb6b19b88cef15cb1e
2018-12-12 12:25:07 -08:00
Geoff Kizer b20a149118 Merge pull request dotnet/corefx#33990 from geoffkizer/http2headerrework
HTTP2: rework SendHeader logic

Commit migrated from https://github.com/dotnet/corefx/commit/b0d8cc9375199b49c333e0565e3d8305e580cec9
2018-12-12 00:52:48 -08:00
Geoff Kizer 7098bd93e7 don't send Uri fragment
Commit migrated from https://github.com/dotnet/corefx/commit/cd6daee1988a516902dd6dd379fac401e078300c
2018-12-11 18:59:38 -08:00
Geoff Kizer a73cb2343d add inbound window update support
Commit migrated from https://github.com/dotnet/corefx/commit/fea9123a7b50b0e26214298d0adf8c8941d8f100
2018-12-11 18:23:47 -08:00
Geoff Kizer d2e4a12922 address PR feedback
Commit migrated from https://github.com/dotnet/corefx/commit/9f1851990fd425eea10a07eaa89383933d7d10b9
2018-12-11 18:10:41 -08:00
Geoff Kizer 815bf9fc33 improve test filter for bogus VPN IPv6 link local addresses
Commit migrated from https://github.com/dotnet/corefx/commit/62d2de45550b12acbc048dfabb21251067fb5b03
2018-12-11 14:41:01 -08:00
Geoff Kizer ae588bad2b address PR feedback
Commit migrated from https://github.com/dotnet/corefx/commit/3e6512efaac99ff3717fc7087355fb1d3a0f852f
2018-12-11 14:25:36 -08:00
Geoff Kizer 5f72c56930 rework SendHeader logic
Commit migrated from https://github.com/dotnet/corefx/commit/e579c0c538d1902e8552015bd974bc398f73cb5f
2018-12-11 13:10:33 -08:00
Geoff Kizer 7daa91aad2 Merge pull request dotnet/corefx#33952 from geoffkizer/http2outbound2
HTTP2: Rework send logic and support request body send

Commit migrated from https://github.com/dotnet/corefx/commit/c30f2bc75066aeccd610f36c8ce84ae5aaff675a
2018-12-11 13:05:35 -08:00
Geoff Kizer 04e05229d3 rework async send handling to avoid "async void"
Commit migrated from https://github.com/dotnet/corefx/commit/7e71cdd8fb956beeb4c8bf004eaff1278d7c06bf
2018-12-10 13:55:48 -08:00
Geoff Kizer bedf3bfb82 add private modifier to nested Stream implementations
Commit migrated from https://github.com/dotnet/corefx/commit/0228f948de1a581a27451c19098d01a3b3a9f539
2018-12-10 11:40:10 -08:00
Geoff Kizer 25cd4ea624 remove test calls to EnsureHttp2Feature that are no longer necessary
Commit migrated from https://github.com/dotnet/corefx/commit/79481df38ed168758f4ac6e6fcd4cc5f9cb5611d
2018-12-10 10:31:38 -08:00
Geoff Kizer 8effa76278 add missing EnsureAvailableSpace
Commit migrated from https://github.com/dotnet/corefx/commit/c8add2d184cdde7eb0a55954ae7a23c78289e7c8
2018-12-10 10:29:13 -08:00
Geoff Kizer cfa3fa2365 support request bodies and rework overall send logic
Commit migrated from https://github.com/dotnet/corefx/commit/dba358046535ee05a3a6c23a76c93877819c3bfe
2018-12-10 04:32:14 -08:00
AraHaan f108845249 Turn on xml documentation validation globally. (dotnet/corefx#32934)
* Turn on xml documentation validation globally.

* Ignore warning 1591 globally.

* Fixed build failures.

* Move the Original DocumentationFile Condition to the Group.

Now NoWarn has no Condition on it.

* Fixed NoWarn overwrite.

* Update Directory.Build.props

* Update System.Runtime.CompilerServices.Unsafe.ilproj

* Update file on github web.

Sadly it seems I can only do this on my phone now. RIP

* Update System.Security.Cryptography.Csp.csproj

* Update Directory.Build.props

* Suppress some warnings.

* Fixed remaining compile errors.

* Update System.Diagnostics.StackTrace.csproj

* Update System.Security.Cryptography.Xml.csproj

* Fixed xml documentation typo in Microsoft.VisualBasic.

* Fixed missing suppressions.

* Suppress more errors.

* Suppress more errors.

* Suppress more errors.

* Suppress even more errors.

* Suppress more errors.

* Update Directory.Build.props

* Suppress more errors.

Also fix a documentation issue specific to OSX.

* Suppress more errors.

* Suppress more errors.

* Disable xml documentation for System.Diagnostics.Process.

* Do not overwrite NoWarn.

* Enable docs for S.D.P


Commit migrated from https://github.com/dotnet/corefx/commit/6abb4cd0bafa2a3c7486fb23bcc611bd211d0f8e
2018-12-08 22:21:50 -08:00
Viktor Hofer 66e8f64d31 Consume Microsoft.DotNet.CoreFxTesting package (dotnet/corefx#33423)
* Consume Microsoft.DotNet.CoreFxTesting package

* Remove code coverage dedicated runtime dir config files and switch to Coverlet

* Add global tool support in corefx

* Update code coverage docs

Commit migrated from https://github.com/dotnet/corefx/commit/ae38b7cc3762d832fdcebe27a0aab7b22ab2f3fa
2018-12-06 02:56:11 +01:00
Stephen Toub 2c8e9b5e94 Fix remaining XML comment errors for source.dot.net (dotnet/corefx#33819)
This is hopefully the last batch of XML comment issues causing failures in source.dot.net.

Commit migrated from https://github.com/dotnet/corefx/commit/42c107ce4dcee545c8cdb510be0b60afdb9527ba
2018-12-04 14:30:39 -05:00
Jeremy Barton cefe07725e Add initial support for TLS 1.3 to .NET Core
* TLS 1.3 connections have been tested on Ubuntu 18.10 (OpenSSL 1.1.1).
* There's no public version of Windows with TLS 1.3 enabled.
* There's no public version of macOS with TLS 1.3 enabled out of the box.

When making use of SslProtocols.None (system default) TLS 1.3 is already working on Ubuntu 18.10, this change mainly makes it so that EncryptionPolicy.None is better handled, and that we can restrict-to and report TLS 1.3.

Commit migrated from https://github.com/dotnet/corefx/commit/d30157d9e48cf73e267994e45953722d18ccd4c6
2018-11-12 17:49:05 -08:00
David Shulman 1742d13f56 Fix SPN used for Negotiate authentication (dotnet/corefx#33426)
SocketsHttpHandler was not normalizing the DNS name prior to using it for the SPN
(Service Principal Name). So, when using URI's that involve a CNAME, it was using
the CNAME directly and not evaluating it to the normalized FQDN A record of the host.

This change fixes the behavior to match .NET Framework so that CNAMEs are resolved
properly. We can use the standard Dns.GetHostEntryAsync() API to resolve the name.

From a performance perspective, this additional DNS API call is limited to just
the SPN calculation for NT Auth. Calling this API doesn't impact the performance on the
wire since the OS will cache DNS calls.  Wireshark confirms that no additional DNS
protocol packets will be sent.

.NET Framework actually caches the normalized DNS resolution on the ServicePoint object
when it opens up a connections. Thus, it doesn't have to call Dns.GetHostEntryAsync()
for the SPN calculation. While a future PR could further optimize SocketsHttpHandler to
also cache this DNS host name, it isn't clear it would result in measurable performance gain.

I tested this change in a separate Enterprise testing environment I set up. I created
a CNAME for a Windows IIS server in a Windows domain-joined environment and demonstrated that
the Negotiate protocol results in a Kerberos authentication (and doesn't fall back to NTLM).

Fixes dotnet/corefx#32328 


Commit migrated from https://github.com/dotnet/corefx/commit/684114f26dbc23341b5ae5f8626fb748ac6cec2b
2018-11-12 14:47:16 -08:00
Stephen Toub 425fc64d8f Add System.Net.Http Stream.DisposeAsync overrides
Commit migrated from https://github.com/dotnet/corefx/commit/f23b2c248df86045be75638b205442251f74f5a2
2018-11-12 11:48:28 -05:00
Mykhailo Kaskun a1ac67c7a6 Improve formatting & correct grammar (dotnet/corefx#33271)
* Improve formatting & correct grammar

* Improve formatting & correct grammar


Commit migrated from https://github.com/dotnet/corefx/commit/194b2eb174bcf0683ce3146f1286765cdb897f74
2018-11-08 18:57:19 -08:00
Max Kerr e742fd7a06 Fix Content-Type parsing of quoted charsets (dotnet/corefx#33280)
* Initial fix.

* Test improvements.

* Add comment explaining fix, revert testing change.

* Add new test validating the behavior for an invalid content-type header, add test case for empty string.

* Store headers.ContentType.CharSet to minimize repeated access.

* Clean up test to not rely on the loopback server.

* Switch test content to use characters outside of ASCII range. Disable test on netfx, since it doesn't have the fix implemented here.


Commit migrated from https://github.com/dotnet/corefx/commit/28e216680a990ce4a58798aa0d2026c9d3e1f148
2018-11-08 11:11:28 -08:00
Wes Haggard 954fb511b3 Rename AssemblyKey properties to StrongNameKeyId as part of arcade work
Commit migrated from https://github.com/dotnet/corefx/commit/7edd861bf2dd59ecdb4284e0fd291d7458198a9d
2018-10-30 15:14:01 -07:00
Santiago Fernandez Madero ed8c9574d2 Fix openssl missing reference warning in System.Net.Http uap/all configurations build (dotnet/corefx#33017)
* Fix openssl missing reference warning in System.Net.Http uap/all configurations build

* Move to TargetsUnix


Commit migrated from https://github.com/dotnet/corefx/commit/0e1025e55d403a56e76ece542c3e4355ac79abaf
2018-10-24 16:05:22 -07:00
Geoff Kizer f1f057a5e5 ensure that we don't initiate connection creation under the pool lock, and refactor some connection creation logic (dotnet/corefx#32524)
Commit migrated from https://github.com/dotnet/corefx/commit/83e8985ec3e15f5169e1cbae6378180c13488777
2018-10-20 09:33:09 -04:00
Stephen Toub 57e280987f Respect bufferSize on SocketHttpHandler's ContentLengthReadStream (dotnet/corefx#32820)
When a response includes a Content-Length header and the caller uses CopyToAsync to extract all data from the resulting stream, we're currently ignoring the supplied bufferSize, as we just repeatedly copy through the HttpConnection's existing read buffer.  For short responses, this is fine.  For longer responses, on a slower connection, this is also fine.  But for longer responses on a fast connection where the data is available quickly and often fills the buffer, we can end up making many more network requests than is necessary. HttpConnection's default buffer size is 4K, and although it can grow, it only does so when the response headers need it.  In contrast, the default buffer size used by Stream.CopyToAsync is 80K, and a developer can specify any bufferSize they want in order to control the memory vs throughput trade-off. To better handle this, this commit allows for ContentLengthReadStream to temporarily swap out the HttpConnection's buffer for a larger one pulled from ArrayPool.Shared, just as does the base Stream.CopyToAsync.  This allows it to respect the supplied bufferSize, while not draining the shared pool of large buffers for extended periods of time, only while the processing of the response is in progress.

Commit migrated from https://github.com/dotnet/corefx/commit/a66747cec82ffc96f43152ee52f5e0c1718a6d43
2018-10-15 21:06:57 -04:00
Stephen Toub 89b5c842b2 Add context to InternalExceptions (dotnet/corefx#32828)
To help with debugging if they ever occur (they're not supposed to).

Commit migrated from https://github.com/dotnet/corefx/commit/e34ce59ff0e44766cde20fea5b46868a1096cc33
2018-10-15 20:56:53 -04:00
Stephen Toub 03f424576b Ensure ConnectionCloseReadStream uses provided bufferSize (dotnet/corefx#32803)
SocketHttpHandler will use a ConnectionCloseReadStream as the resulting stream it hands out if the server sent Connection: close.  If CopyToAsync is used from that stream, it falls back to just using CopyToAsync on the underlying stream (usually a NetworkStream or SslStream).  In doing so, though, if there is already some data remaining in the HttpConnection's buffer, it first has to copy the data from that buffer, and then when it goes to use CopyToAsync on the underlying stream, it neglects to pass through the caller provided bufferSize.  This fixes that.

Commit migrated from https://github.com/dotnet/corefx/commit/343c98837c8959f18f75143126a5ac801adc3db0
2018-10-13 22:30:01 -04:00
Stephen Toub f42f25247a Fix Timer rooting issue with SocketsHttpHandler (dotnet/corefx#32793)
We have an unexpected rooted cycle that's unexpectedly keeping an HttpConnectionPoolManager and all of its state alive indefinitely if the HttpClient/SocketsHttpHandler isn't Disposed.

HttpConnectionPoolManager creates a "cleaning timer" that runs every now and then in order to remove stale connection pools that are no longer needed.  In order to do that, the Timer is passed the HttpConnectionManagerPool as state.  That normally wouldn't be a problem, except that the HttpConnectionManagerPool then stores a strong reference to the Timer, creating a cycle: Timer -> TimerHolder -> TimerQueueTimer -> HttpConnectionPoolManager -> Timer.  The TimerQueueTimer is rooted by the underlying timer implementation, with it stored in a static array.  And TimerHolder has a finalizer that disposes of the Timer, but it's being kept alive as part of the cycle.

To break the cycle, we give the Timer a weak reference (rather than strong reference) to the HttpConnectionPoolManager.

Commit migrated from https://github.com/dotnet/corefx/commit/449190d7c873b56337ba6a7f2d9b53f5232ad16d
2018-10-13 20:40:04 -04:00
Max Kerr 8e99673f97 Fix flaky 100-Continue test on CurlHandler. (dotnet/corefx#32653)
Commit migrated from https://github.com/dotnet/corefx/commit/5ee58d9cf528db08230edb201471da28cd7a5fe5
2018-10-05 17:40:00 -07:00
David Shulman e03c1b170b Skip some Http auth tests on UAP (dotnet/corefx#32646)
Some Http auth related tests have begun failing all the time on Outerloop UWP runs:

* GetAsync_ServerNeedsBasicAuthAndSetDefaultCredentials_StatusCodeUnauthorized
* GetAsync_CredentialIsNetworkCredentialUriRedirect_StatusCodeUnauthorized

The UAP version of Http stack uses WinRT APIs (which use WinInet). And there is
implicit caching of credentials per-process due to WinInet. So, we need to disable
these tests on UAP similar to other tests in this file.

Contributes to dotnet/corefx#32647

Commit migrated from https://github.com/dotnet/corefx/commit/e7e60c52911705bf38cd3dbbfbc9b726209130e7
2018-10-05 14:21:56 -07:00
Filip Navara ef59f0f707 Treat the 'algorithm' parameter in Digest HTTP authentication as case-insensitive. (dotnet/corefx#32632)
Fixes dotnet/corefx#32408


Commit migrated from https://github.com/dotnet/corefx/commit/1d737919b3a74dd3d26a80b2268014b48a41a8d4
2018-10-05 11:11:16 -07:00
Marco Rossignoli eed59da488 Fix HttpClient sending fragment portion of uri on request (dotnet/corefx#32574)
Fixes dotnet/corefx#32378


Commit migrated from https://github.com/dotnet/corefx/commit/87a944afb3e0ec392d5838900b5498e015d5e47b
2018-10-04 09:40:41 -07:00
Tomas Weinfurt 256e18fcd3 disable ConnectTimeout_TimesOutSSLAuth_Throws (dotnet/corefx#32564)
Commit migrated from https://github.com/dotnet/corefx/commit/b3475286fbfff67869f8fbc76f391c1f43a40f53
2018-10-01 13:38:57 -07:00
Tomas Weinfurt 6b900e8e6f socket handler does not depend on platfrom curl (dotnet/corefx#32543)
Commit migrated from https://github.com/dotnet/corefx/commit/20b2f55558f729f24fc063f520b35ab0adeec924
2018-09-29 14:28:39 -07:00
Geoff Kizer 17581ed649 add TaskCompletionSourceWithCancellation and ensure we are propagating the cancellationToken on cancellation
Commit migrated from https://github.com/dotnet/corefx/commit/43c212c85df41c3a339884efbf74b24f81b0b019
2018-09-27 14:54:33 -07:00
Geoff Kizer 6fa5e1652f use Queue<TaskCompletionSource<HttpConnection>> for waiter queue
Commit migrated from https://github.com/dotnet/corefx/commit/3123c5d3cf56d53d66bafe4537ce57b1a2f9d726
2018-09-27 13:28:43 -07:00
Geoff Kizer 1bedcac5f4 fix merge issues
Commit migrated from https://github.com/dotnet/corefx/commit/9492c90b407e5ee64d49d194d3442a91c5972e76
2018-09-27 13:28:43 -07:00
Geoff Kizer 511555250a consolidate TransferConnection logic
Commit migrated from https://github.com/dotnet/corefx/commit/71b749abf95d5edb7b12f7b652f87fcb7a14b33e
2018-09-27 13:28:43 -07:00
Geoff Kizer bf1f22b74c review feedback
Commit migrated from https://github.com/dotnet/corefx/commit/5825236de01a2446b2c0fd5eeae066eca833553b
2018-09-27 13:27:10 -07:00
Geoff Kizer 8094d8fd2a reduce size of ConnectionWaiter object
Commit migrated from https://github.com/dotnet/corefx/commit/7acb4f3e3db3decca67ff9ef606a3e4f5608581c
2018-09-27 13:27:10 -07:00
Geoff Kizer 47f71a91e4 rework connection pool cancellation to avoid deadlock
Commit migrated from https://github.com/dotnet/corefx/commit/4d8f60eb8d31e6f535890259b1bf3240ddf56223
2018-09-27 13:27:10 -07:00
Stephen Toub d0b424b05a Move work out of HttpConnectionPool.ReturnConnection lock (dotnet/corefx#32500)
Some of the work being done inside the lock can be done before or after it instead.

Commit migrated from https://github.com/dotnet/corefx/commit/29e351853cd6c8896cc5081f12c6a0d81b9755c5
2018-09-27 15:53:50 -04:00