platform/upstream/dotnet/runtime.git
5 years agoUpdate src/System.Net.Http/tests/StressTests/HttpStress/Program.cs
Eirik Tsarpalis [Tue, 16 Jul 2019 13:58:32 +0000 (14:58 +0100)]
Update src/System.Net.Http/tests/StressTests/HttpStress/Program.cs

Co-Authored-By: Stephen Toub <stoub@microsoft.com>
Commit migrated from https://github.com/dotnet/corefx/commit/bee6f7fa2f76f5793a89027132b3ece7af82e30c

5 years agoremove unused cli param
Eirik Tsarpalis [Tue, 16 Jul 2019 08:47:43 +0000 (09:47 +0100)]
remove unused cli param

Commit migrated from https://github.com/dotnet/corefx/commit/7e595109699e301f31e3ffd3dda4aca9755c5c8a

5 years agoforce cancellations to only trigger after request has been sent
Eirik Tsarpalis [Mon, 15 Jul 2019 22:38:16 +0000 (23:38 +0100)]
force cancellations to only trigger after request has been sent

Commit migrated from https://github.com/dotnet/corefx/commit/524af177fd3e39de47dae3394b516f8a02a6446d

5 years agodispose CancellationTokenSources
Eirik Tsarpalis [Mon, 15 Jul 2019 18:36:01 +0000 (19:36 +0100)]
dispose CancellationTokenSources

Commit migrated from https://github.com/dotnet/corefx/commit/58c85e29cfaa4b6bd8002a5c90c5262ca0cb29cf

5 years agoHttpStress: Randomize cancellation of requests
Eirik Tsarpalis [Mon, 15 Jul 2019 16:40:50 +0000 (17:40 +0100)]
HttpStress: Randomize cancellation of requests

Commit migrated from https://github.com/dotnet/corefx/commit/c4167ed11e1444433a33cc5d44a4aa33e0ffd651

5 years agoImprove allocations in WinForms startup (dotnet/corefx#39275)
Jeremy Kuhne [Mon, 15 Jul 2019 22:19:17 +0000 (15:19 -0700)]
Improve allocations in WinForms startup (dotnet/corefx#39275)

* Strip out delegate API calls and use the SetDllImportResolver functionality instead.

* Fix the Unix buidl

* Fix NetFX build, create class for custom resolving

* Fix namespace, tweak comments in project file

* Tweak LibraryResolver per feedback

* Fix  breaks

* Adjust tests for NetFX behavior

* Harvest downlevel packages

* Put back UAP build, respond to feedback on projects and LOGFONT marking

* Remove local

* Tweak FileNotFoundException, guard in PageSettings

* Address feedback

Change LOGFONT round tripping to allow structs

* Fix hintpath. Finish fixing LOGFONT references.

* Address feedback

Commit migrated from https://github.com/dotnet/corefx/commit/b75421a0035bf3a44e1f68447255470d57074dbb

5 years agoReenable GCNotificationTests test (dotnet/corefx#39499)
Andy Hanson [Mon, 15 Jul 2019 22:00:30 +0000 (15:00 -0700)]
Reenable GCNotificationTests test (dotnet/corefx#39499)

Undoes dotnet/corefx#39375

Fix dotnet/corefx#39374

Commit migrated from https://github.com/dotnet/corefx/commit/4cb27d38819050bd01576d042f54537887debaa8

5 years agoPropagate correct exception in Http2Connection.Abort (dotnet/corefx#39496)
Stephen Toub [Mon, 15 Jul 2019 21:17:18 +0000 (17:17 -0400)]
Propagate correct exception in Http2Connection.Abort (dotnet/corefx#39496)

Ensure we pass the `_abortException`, not `abortException`, to the streams, and log any non-duplicate exception.

Commit migrated from https://github.com/dotnet/corefx/commit/cfccc26f9e77fa9f745857ec48a256309e29f39d

5 years agoAdded client operation for posting form data (dotnet/corefx#39437)
Anirudh Agnihotry [Mon, 15 Jul 2019 21:13:30 +0000 (14:13 -0700)]
Added client operation for posting form data (dotnet/corefx#39437)

* added client operation for post data

* client operation for multipart data content

* remove the subset test

Commit migrated from https://github.com/dotnet/corefx/commit/eee164d069f36ed4d8f850799bd6b9e414b2d23b

5 years agoIncrease wait timeout and add extra logs for Pipe Deadlock tests (dotnet/corefx#39436)
Justin Kotalik [Mon, 15 Jul 2019 20:20:10 +0000 (13:20 -0700)]
Increase wait timeout and add extra logs for Pipe Deadlock tests (dotnet/corefx#39436)

* Increase wait timeout and add extra logs

* nits

* Update FlushAsyncCancellationTests.cs

* Update ReadAsyncCancellationTests.cs

* This is what happens when you edit on github

* another one

Commit migrated from https://github.com/dotnet/corefx/commit/0de2d187a080a306b88cf57cc762a1ca601eceaa

5 years agoEnsure that CancellationToken is propagated to built-in request content types (dotnet...
Stephen Toub [Mon, 15 Jul 2019 20:17:56 +0000 (16:17 -0400)]
Ensure that CancellationToken is propagated to built-in request content types (dotnet/corefx#39474)

* Ensure that CancellationToken is propagated to built-in request content types

We don't currently expose the overload that would allow CancellationToken to be accessed by HttpContent-derived types in general, but we can at least ensure that when using the built-in content types, the CancellationToken provided to SendAsync is appropriately threaded through.  We were doing this previously in only a few cases, where we knew that the previous overload wouldn't be overridden (namely internal types and sealed types), but we can enable the 90% scenario as well by doing a type check at run-time.

* Disable cancellation test for UAP handler

Commit migrated from https://github.com/dotnet/corefx/commit/450f49a1a80663529b31d3defafbd5e59822a16a

5 years agoMake CreateConverter public and add options (dotnet/corefx#39438)
Jeremy Kuhne [Mon, 15 Jul 2019 19:42:55 +0000 (12:42 -0700)]
Make CreateConverter public and add options (dotnet/corefx#39438)

* Make CreateConverter public and add options

This is to facilitate composition with factory converters.

* Remove unnecessary using

Commit migrated from https://github.com/dotnet/corefx/commit/db543576d757f2d448f004f5e9ba2b77c2b497fe

5 years agoDisable Connection_UnderDifferentUsers_BehavesAsExpected test on Fedora (dotnet/coref...
Stephen Toub [Mon, 15 Jul 2019 19:22:33 +0000 (15:22 -0400)]
Disable Connection_UnderDifferentUsers_BehavesAsExpected test on Fedora (dotnet/corefx#39491)

Commit migrated from https://github.com/dotnet/corefx/commit/ace61287bee166a3777f5b3832295902a58ca79a

5 years agoUpdate issue-guide.md
Tarek Mahmoud Sayed [Mon, 15 Jul 2019 19:21:35 +0000 (12:21 -0700)]
Update issue-guide.md

Commit migrated from https://github.com/dotnet/corefx/commit/dc2df780bc177aab90a1e1949bf10beff490e0ea

5 years agoAvoid calling ctor on abstract type during deserialization (dotnet/corefx#39481)
Steve Harter [Mon, 15 Jul 2019 18:52:41 +0000 (11:52 -0700)]
Avoid calling ctor on abstract type during deserialization (dotnet/corefx#39481)

Commit migrated from https://github.com/dotnet/corefx/commit/a7efd2a2b3c638b5490547ad6beca128ba5d7bfe

5 years agoDisable TestVerify test failing in outerloop on Unix (dotnet/corefx#39488)
Stephen Toub [Mon, 15 Jul 2019 17:55:36 +0000 (13:55 -0400)]
Disable TestVerify test failing in outerloop on Unix (dotnet/corefx#39488)

Commit migrated from https://github.com/dotnet/corefx/commit/0441d3e8ed8779f52a759890ac3e94fb7fe56bc0

5 years agoAdd tests for nullable metadata and unconditionally set nullablePublicOnly (dotnet...
Santiago Fernandez Madero [Mon, 15 Jul 2019 17:37:36 +0000 (10:37 -0700)]
Add tests for nullable metadata and unconditionally set nullablePublicOnly (dotnet/corefx#39395)

* Add tests for nullable compiler emitted attributes

* Set nullablePublicOnly compiler feature unconditionally

* PR Feedback

* PR Feedback -- add positive and more exhaustive tests

Commit migrated from https://github.com/dotnet/corefx/commit/08cd402602ab5d3ce26fda968f9e0e1dff2d8b6f

5 years agoAddress nits from other PRs (dotnet/corefx#39482)
Steve Harter [Mon, 15 Jul 2019 17:29:03 +0000 (10:29 -0700)]
Address nits from other PRs (dotnet/corefx#39482)

Commit migrated from https://github.com/dotnet/corefx/commit/8af2b531bdd0ea41d3507870fadf9a26d663e700

5 years agoFix support for scientific notation numbers with decimal separators in JsonElement...
Víctor Reyes Rodríguez [Mon, 15 Jul 2019 17:16:29 +0000 (19:16 +0200)]
Fix support for scientific notation numbers with decimal separators in JsonElement.WriteTo

Commit migrated from https://github.com/dotnet/corefx/commit/e88ed00a06561a33cafa40108f8eac5d4d0b2514

5 years agoFix SocketsHttpHandler canceling request when response stream dropped (dotnet/corefx...
Stephen Toub [Mon, 15 Jul 2019 17:12:27 +0000 (13:12 -0400)]
Fix SocketsHttpHandler canceling request when response stream dropped (dotnet/corefx#39471)

* Fix SocketsHttpHandler canceling request when response stream dropped

Good code using HttpClient should Dispose of the HttpResponseMessage and/or response Stream when its done with it.  However, if code fails to do so, we still want to ensure that we don't leak connections/requests to the server or leak resources on the client.  If the response isn't disposed but the code reads all the way to the end of it, then internally things are cleaned up.  But if the response isn't disposed and hasn't read to the end, for both HTTP/1.1 and HTTP/2, we have some issues.

For HTTP/1.1, we rely on the Socket's finalization to close the associated connection.  However, we use a cache of SocketAsyncEventArgs instances to handle creating connections, and it turns out that these SocketAsyncEventArgs instances are keeping around a reference to the last created Socket.  If the SAEA is reused for another connection, then there's no issue, but until it is, it maintains several references to the socket: in ConnectSocket, in _currentSocket, in _multipleConnect, and then further within another SAEA instance that the _multipleConnect itself is creating for some reason.  We should go through and clean all that up in SAEA, but for now, this just removes the SAEA cache.

For HTTP/2, nothing was cleaning up in this case.  To handle it, we:
1. Make the response stream finalizable, such that when finalized it behaves as if Dispose were called.
2. When SendAsync completes, we remove the strong reference from the Http2Stream to the response message, such that the response (and in turn the response stream) doesn't get rooted by the Http2Connection storing the Http2Stream in its dictionary).
3. The only reason that reference was still needed was to support trailing headers.  So we create a lazily-allocated list on the Http2Stream for storing trailers if any should arrive, and then when the response body completes, the response stream pulls those headers in from the temporary collection into the response that it then has a reference to.  This also helps to avoid a race condition where consuming code erroneously accesses TrailingHeaders before the request has completed, in which case we previously could have been trying to write to the collection while user code was reading from it; with this change, that mutation happens as part of a call the consumer makes.

* Address PR feedback

Commit migrated from https://github.com/dotnet/corefx/commit/8b5eb8d9fb7857e5b40e763287f8f8832c15af31

5 years agoAdd UTF-8 APIs on TextEncoder and add JavascriptEncoder to JsonEncodedText (dotnet...
Steve Harter [Mon, 15 Jul 2019 16:39:58 +0000 (09:39 -0700)]
Add UTF-8 APIs on TextEncoder and add JavascriptEncoder to JsonEncodedText (dotnet/corefx#39415)

Commit migrated from https://github.com/dotnet/corefx/commit/bbbcac59ac07f344ce4e257ef182a90c429d2b58

5 years agoReplace collection instances on deserialize (dotnet/corefx#39442)
Steve Harter [Mon, 15 Jul 2019 14:07:30 +0000 (07:07 -0700)]
Replace collection instances on deserialize (dotnet/corefx#39442)

Commit migrated from https://github.com/dotnet/corefx/commit/ef1ac63f264c6c1f170315c636da49b4bf421dd9

5 years agoUpdate Http2_FlowControl_ClientDoesNotExceedWindows to use ByteAtATimeContent for...
Cory Nelson [Mon, 15 Jul 2019 04:19:34 +0000 (21:19 -0700)]
Update Http2_FlowControl_ClientDoesNotExceedWindows to use ByteAtATimeContent for compat with recent buffering change. (dotnet/corefx#39472)

Clear ActiveIssue as original issue in dotnet/corefx#38799 could not be reproduced.

Commit migrated from https://github.com/dotnet/corefx/commit/929bd81ee11728434ebf9c06152408b4b9940d12

5 years agoRemove the WriteNullStringAsProperty test
Jeremy Barton [Sat, 13 Jul 2019 21:34:29 +0000 (14:34 -0700)]
Remove the WriteNullStringAsProperty test

The writer has standardized on not allowing null -> Empty coercion, and this
test no longer is needed since JsonElement doesn't have a WriteProperty method,
and a JsonProperty can't ever have a null property name.

Commit migrated from https://github.com/dotnet/corefx/commit/5294f0da4695162603d24dba351c985181042796

5 years agoChange (string)null behaviors in Utf8JsonWriter
Jeremy Barton [Sat, 13 Jul 2019 14:20:12 +0000 (07:20 -0700)]
Change (string)null behaviors in Utf8JsonWriter

ArgumentNullException when used as a property name, empty string
as a property name if it's already in ReadOnlySpan<char>.

* WriteNull(string)
* WriteBoolean(string, bool)
* WriteNumber(string, *)
* WriteString(string, *)
* WriteStartArray(string)
* WriteStartObject(string)
* WritePropertyName(string)

Emits the null literal (vs the empty string):

* WriteStringValue(string)
* WriteString(*, string)

Since the writer will write null via WriteStringValue, the reader GetString()
now will return null if TokenType is null (matches JsonElement behavior).

Commit migrated from https://github.com/dotnet/corefx/commit/adce92338911eec22e5c8f9f071ece857de7d624

5 years agoRetry on GOAWAY (dotnet/corefx#39127)
Krzysztof Wicher [Sat, 13 Jul 2019 04:07:20 +0000 (21:07 -0700)]
Retry on GOAWAY (dotnet/corefx#39127)

* Retry on GOAWAY

* send correct GOAWAY on retried connection, update comment

* Harden against flakiness

* Fix: Connection refused error is different on Debian

* apply feedback

* Make partial body/received headers case deterministic, pass error code on REFUSED_STREAM

* apply latest feedback

Commit migrated from https://github.com/dotnet/corefx/commit/1841042b99062de13dc80098cede9413be569238

5 years agoFix assert in MapVerifyErrorToChainStatus from DigiCert CRLs
Jeremy Barton [Sat, 13 Jul 2019 01:55:27 +0000 (18:55 -0700)]
Fix assert in MapVerifyErrorToChainStatus from DigiCert CRLs

* Define all of the X509_V_ERR* values form OpenSSL 1.0/1.1
* Exempt X509_V_ERR_DIFFERENT_CRL_SCOPE from being reported, as it is redundant to X509_V_ERR_UNABLE_TO_GET_CRL
* The remaining new X509_V_ERR* codes will still trip the assert, largely because
they should be behind option flags that we don't enable.

This change also makes the CRL cache entry also consider the specific CDP URL:

DigiCert currently has at least two distinct CRLs running for the same CA
(C = US, O = DigiCert Inc, CN = DigiCert SHA2 Secure Server CA)
* URI:http://crl3.digicert.com/ssca-sha2-g5.crl
* URI:http://crl3.digicert.com/ssca-sha2-g6.crl

Using the current cache name strategy, just a hash of the CA name, some of the
certs get meaningful revocation, and others do not.

Now the file name will be {ca name hash}.{url hash}.crl, enabling the DigiCert
scenario.  Upgrading across this change will cause CRLs to be re-downloaded,
but that's a thing that happens over time anyways.

Commit migrated from https://github.com/dotnet/corefx/commit/95bbbcd9f85aecd29df0e47b2aa3b65f0fac71a2

5 years agoAdd reflection root for DataTableMappingConverter (dotnet/corefx#39432)
Sven Boemer [Fri, 12 Jul 2019 23:36:36 +0000 (16:36 -0700)]
Add reflection root for DataTableMappingConverter (dotnet/corefx#39432)

Used via TypeConverterAttribute.
Caught while investigating linker diffs.

Commit migrated from https://github.com/dotnet/corefx/commit/8f5b5f9977f724432ac02ab9645621ddcf34e590

5 years agoDo not use DictionaryKeyPolicy on deserialization (dotnet/corefx#39392)
Layomi Akinrinade [Fri, 12 Jul 2019 22:55:11 +0000 (18:55 -0400)]
Do not use DictionaryKeyPolicy on deserialization (dotnet/corefx#39392)

* Do not use DictionaryKeyPolicy on deserialization

* Update policy doc

Commit migrated from https://github.com/dotnet/corefx/commit/ba8641a3cdfc9372597e4dbd5ad62be4cbc32b8b

5 years agoFix VS Test explorer SDK mismatch (dotnet/corefx#39440)
Santiago Fernandez Madero [Fri, 12 Jul 2019 22:46:38 +0000 (15:46 -0700)]
Fix VS Test explorer SDK mismatch (dotnet/corefx#39440)

Commit migrated from https://github.com/dotnet/corefx/commit/23f6feb8abf3e6b7ba37eba1731a30e0eb7fcb96

5 years agoAdd WriteTo API on JsonDocument and JsonProperty (dotnet/corefx#39367)
Vishnu Kumar [Fri, 12 Jul 2019 22:06:08 +0000 (03:36 +0530)]
Add WriteTo API on JsonDocument and JsonProperty (dotnet/corefx#39367)

* Remove WriteProperty methods and rename WriteValue to WriteTo in JsonElement (dotnet/corefx#39037)

* Add WriteTo method in JsonDocument and JsonProperty (dotnet/corefx#39037)

* Remove all repeated tests from JsonDocument and JsonProperty for now.

* Added null check for Utf8JsonWriter parameter in WriteTo methods on JsonElement, JsonDocument and JsonProperty

* Code review changes

Commit migrated from https://github.com/dotnet/corefx/commit/798468fb39d869a96104306483ed6ef4d63738ca

5 years agoFix warning for duplicate publish target import (dotnet/corefx#39423)
Viktor Hofer [Fri, 12 Jul 2019 21:38:29 +0000 (23:38 +0200)]
Fix warning for duplicate publish target import (dotnet/corefx#39423)

Commit migrated from https://github.com/dotnet/corefx/commit/187dc7f6d63549948690359fbe1f28e541aff344

5 years agoUpdate cross-platform-cryptography document
Jeremy Barton [Fri, 12 Jul 2019 21:12:04 +0000 (14:12 -0700)]
Update cross-platform-cryptography document

Commit migrated from https://github.com/dotnet/corefx/commit/3e6b71e83d3ef198cbfbbf1e184a41a4eef679a4

5 years agoDisable FinancialTests on ARM (dotnet/corefx#39391)
Charles Stoner [Fri, 12 Jul 2019 20:18:16 +0000 (13:18 -0700)]
Disable FinancialTests on ARM (dotnet/corefx#39391)

Commit migrated from https://github.com/dotnet/corefx/commit/137f24a5acdee6bb9b3d57b5d39c83d20df2d42d

5 years agoFix allocations in SystemEvents (dotnet/corefx#39312)
Jeremy Kuhne [Fri, 12 Jul 2019 20:15:46 +0000 (13:15 -0700)]
Fix allocations in SystemEvents (dotnet/corefx#39312)

* Fix allocations in SystemEvents

Remove unnecessary allocations by correcting interop signatures and removing app domain specific logic.

* Address feedback.

* Remove IntPtr, fix comments

* Pass by ref

* Address comment/naming feedback

Commit migrated from https://github.com/dotnet/corefx/commit/4f2fb593a088c0b87b9cb60aef0267952d903491

5 years agoAdded client operation for get query with parameters (dotnet/corefx#39398)
Anirudh Agnihotry [Fri, 12 Jul 2019 18:51:18 +0000 (11:51 -0700)]
Added client operation for get query with parameters (dotnet/corefx#39398)

* added client operation for get query with parameters

* using stringBuilder for expected string and allowing user to control size when query parameters are present

* typo corrected

Commit migrated from https://github.com/dotnet/corefx/commit/54a2443797b070db11dcd82014a2d8c56f7cbc78

5 years agoDon't apply dictionary key policy on extension data (dotnet/corefx#39425)
Steve Harter [Fri, 12 Jul 2019 18:21:20 +0000 (11:21 -0700)]
Don't apply dictionary key policy on extension data (dotnet/corefx#39425)

Commit migrated from https://github.com/dotnet/corefx/commit/743149dd45ddf6de418d945ca43cd4beadc81017

5 years agoRead WinHTTP's proxy format correctly (dotnet/corefx#39371)
Cory Nelson [Fri, 12 Jul 2019 16:58:34 +0000 (09:58 -0700)]
Read WinHTTP's proxy format correctly (dotnet/corefx#39371)

Fix SocketsHttpHandler to properly read WinHTTP's proxy string format, preventing an exception when a PAC script returns multiple proxies. Resolves dotnet/corefx#39104.

Commit migrated from https://github.com/dotnet/corefx/commit/70b45baaf36eab34fcfb44056b030654dba9a4dc

5 years agoFix writer depth issue on large stream async (dotnet/corefx#39417)
Steve Harter [Fri, 12 Jul 2019 16:50:21 +0000 (09:50 -0700)]
Fix writer depth issue on large stream async (dotnet/corefx#39417)

Commit migrated from https://github.com/dotnet/corefx/commit/86b699192dd1a7d0ad3f8765f05e401056bdb6be

5 years agoHttp2Connection: Wrap InvalidOperationExceptions (dotnet/corefx#39400)
Eirik Tsarpalis [Fri, 12 Jul 2019 16:39:52 +0000 (17:39 +0100)]
Http2Connection: Wrap InvalidOperationExceptions (dotnet/corefx#39400)

* Http2Connection: Wrap InvalidOperationExceptions

To achieve parity with the v1.1 implementation. Fixes dotnet/corefx#39295

* do not shutdown connection on server side

* prevent disposal of client before server has established connection

Commit migrated from https://github.com/dotnet/corefx/commit/68e7999c846131bd8cd43899671fa6a4a7b5da53

5 years agoFixes to Pipe (dotnet/corefx#39390)
David Fowler [Fri, 12 Jul 2019 15:34:36 +0000 (08:34 -0700)]
Fixes to Pipe (dotnet/corefx#39390)

* Fixes to Pipe
- Avoid clearing out the writing head in more cases
- Allow returning a fully consumed block even if writing is in progress if it isn't writing using the current block.
- Synchronize call to Advance

* Advance can no longer be inlined

Commit migrated from https://github.com/dotnet/corefx/commit/34765c5934c4b2f45853d323f4c87617cd2f3158

5 years agoUpdate issue-guide.md
Karel Zikmund [Fri, 12 Jul 2019 13:22:42 +0000 (15:22 +0200)]
Update issue-guide.md

Add @eiriktsarpalis as Networking owner

Commit migrated from https://github.com/dotnet/corefx/commit/be248490f24dc5a19ae53fd95f33bab19e802a83

5 years agoMerge pull request dotnet/corefx#39242 from scalablecory/38788-ping-race
Geoff Kizer [Fri, 12 Jul 2019 08:58:00 +0000 (01:58 -0700)]
Merge pull request dotnet/corefx#39242 from scalablecory/38788-ping-race

Fix a race in buffer usage of Http2Connection.ProcessPingFrame

Commit migrated from https://github.com/dotnet/corefx/commit/1d03a9106905278e82ee98ceee2d451b0e008000

5 years agoMove integer read into ProcessPingFrame.
Cory Nelson [Fri, 12 Jul 2019 06:29:05 +0000 (23:29 -0700)]
Move integer read into ProcessPingFrame.

Commit migrated from https://github.com/dotnet/corefx/commit/790f53719c3816a0d010966848fbdaeb412928a3

5 years agoAdvance can no longer be inlined
David Fowler [Fri, 12 Jul 2019 05:27:20 +0000 (22:27 -0700)]
Advance can no longer be inlined

Commit migrated from https://github.com/dotnet/corefx/commit/8f672e7b2641bea4746d533b52a46b869d853cd4

5 years agoRemove GetWaiterTask allocation for display class (dotnet/corefx#39411)
Stephen Toub [Fri, 12 Jul 2019 00:28:47 +0000 (20:28 -0400)]
Remove GetWaiterTask allocation for display class (dotnet/corefx#39411)

Using an async local function here that accesses its outer function's state is resulting in the compiler allocating a display class at the beginning of GetWaiterTask.

Commit migrated from https://github.com/dotnet/corefx/commit/59b60a232ecf3df2319fadd0193f5dcb42948e29

5 years agoAvoid loading resources for an SslStream exception never thrown (dotnet/corefx#39414)
Stephen Toub [Fri, 12 Jul 2019 00:28:09 +0000 (20:28 -0400)]
Avoid loading resources for an SslStream exception never thrown (dotnet/corefx#39414)

SslStream's cctor creates an ObjectDisposedException it uses as a sentinel, but this instance is never actually thrown.  As such, we don't need to pay to load resources for it.

Commit migrated from https://github.com/dotnet/corefx/commit/7055a28952ce82e79f93519a68025dc884545645

5 years agoRemove RestoreSources from Tools.props (dotnet/corefx#39399)
Viktor Hofer [Thu, 11 Jul 2019 23:13:21 +0000 (01:13 +0200)]
Remove RestoreSources from Tools.props (dotnet/corefx#39399)

Commit migrated from https://github.com/dotnet/corefx/commit/787b7cd8a70f8d9cb3b4791524934b77e673ae86

5 years ago[master] Update dependencies from 4 repositories (dotnet/corefx#39384)
dotnet-maestro[bot] [Thu, 11 Jul 2019 21:55:16 +0000 (21:55 +0000)]
[master] Update dependencies from 4 repositories (dotnet/corefx#39384)

* Update dependencies from https://github.com/dotnet/core-setup build 20190711.01

- Microsoft.NETCore.App - 3.0.0-preview8-27911-01
- Microsoft.NETCore.DotNetHostPolicy - 3.0.0-preview8-27911-01
- Microsoft.NETCore.DotNetHost - 3.0.0-preview8-27911-01

* Update dependencies from https://github.com/dotnet/corefx build 20190710.10

- runtime.native.System.IO.Ports - 4.6.0-preview8.19360.10
- Microsoft.NETCore.Platforms - 3.0.0-preview8.19360.10

* Update dependencies from https://dev.azure.com/dnceng/internal/_git/dotnet-optimization build 20190711.1

- optimization.windows_nt-x64.IBC.CoreFx - 99.99.99-master-20190711.1

* Update dependencies from https://github.com/dotnet/standard build 20190711.1

- NETStandard.Library - 2.1.0-prerelease.19361.1

* Update dependencies from https://github.com/dotnet/standard build 20190711.2

- NETStandard.Library - 2.1.0-prerelease.19361.2

* Update APICompat baseline

* Update dependencies from https://github.com/dotnet/standard build 20190711.3

- NETStandard.Library - 2.1.0-prerelease.19361.3

Commit migrated from https://github.com/dotnet/corefx/commit/ac154845e79c6154c2b502aa3cdd4410e1b5f2b0

5 years agoCondition failing test on Nano (dotnet/corefx#39403)
Viktor Hofer [Thu, 11 Jul 2019 20:41:14 +0000 (22:41 +0200)]
Condition failing test on Nano (dotnet/corefx#39403)

Commit migrated from https://github.com/dotnet/corefx/commit/bd30a3f458b6b0f71204fc3630b2d29b780c4167

5 years agoCapitalize comment.
Cory Nelson [Thu, 11 Jul 2019 18:38:54 +0000 (11:38 -0700)]
Capitalize comment.

Commit migrated from https://github.com/dotnet/corefx/commit/484aa6450871027f7576e5cc00495a7ab0c4fc50

5 years agoSeveral additional HttpStress improvements (dotnet/corefx#39388)
Stephen Toub [Thu, 11 Jul 2019 17:02:38 +0000 (13:02 -0400)]
Several additional HttpStress improvements (dotnet/corefx#39388)

- Enable HTTP/1.1 and HTTP/2 to be used concurrently
- Fix duplex tests now that only custom content may be duplex
- Add option to set pooled connection lifetime to stress connection management
- Add client operation for reading portion of response and throwing the rest away

Commit migrated from https://github.com/dotnet/corefx/commit/88ab17433f45c37e4e28e2bb6dce3c74aea81c0d

5 years agoClean up Timer tests (dotnet/corefx#39333)
Stephen Toub [Thu, 11 Jul 2019 15:55:30 +0000 (11:55 -0400)]
Clean up Timer tests (dotnet/corefx#39333)

- Add argument names to Assert.Throws
- Add coverage for some uncovered cases
- Put test classes in namespaces
- Consolidate some tests

Commit migrated from https://github.com/dotnet/corefx/commit/ccf9ccfc38922cfe1c6eaa568e83b09119a2dd6b

5 years agoS.S.C.Pkcs: Make static field initialization order deterministic
Filip Navara [Thu, 11 Jul 2019 15:52:36 +0000 (17:52 +0200)]
S.S.C.Pkcs: Make static field initialization order deterministic

Remove ManagedPkcsPal.Instance to avoid any potential misuse, which solves the cctor ordering problem.

Makes a static method for the reason the ManagedPkcsPal was being directly invoked into.

Commit migrated from https://github.com/dotnet/corefx/commit/014b7bc7c6b70deccef6d9a775852656cc514f5d

5 years agoFixes to Pipe
David Fowler [Thu, 11 Jul 2019 14:49:45 +0000 (07:49 -0700)]
Fixes to Pipe
- Avoid clearing out the writing head in more cases
- Allow returning a fully consumed block even if writing is in progress if it isn't writing using the current block.
- Synchronize call to Advance

Commit migrated from https://github.com/dotnet/corefx/commit/00c43bd29cd408db3b6b4a8255f32a8f420024ca

5 years agoAdd script to support VS Test Explorer (dotnet/corefx#39358)
Viktor Hofer [Thu, 11 Jul 2019 13:36:38 +0000 (15:36 +0200)]
Add script to support VS Test Explorer (dotnet/corefx#39358)

Commit migrated from https://github.com/dotnet/corefx/commit/08a4e0f6f929a86b7c7bc4558a507b90bf5545ae

5 years agoHttpStress: Use randomized content lengths (dotnet/corefx#39368)
Eirik Tsarpalis [Thu, 11 Jul 2019 12:59:25 +0000 (13:59 +0100)]
HttpStress: Use randomized content lengths (dotnet/corefx#39368)

* HttpStress: use randomized content lengths

Adds pseudo-random content payloads in the http stress test harness.
All random data derives from a single seed which can be optionally specified at the CLI.

* address feedback

* Remove dead code

Commit migrated from https://github.com/dotnet/corefx/commit/e642ef9c661680c3d3eb650e37fb28d82f2fafec

5 years agoRemove stale nullable !s and pragmas (dotnet/corefx#39376)
Stephen Toub [Thu, 11 Jul 2019 12:51:57 +0000 (08:51 -0400)]
Remove stale nullable !s and pragmas (dotnet/corefx#39376)

Also update TODO-NULLABLE comments to be more specific where appropriate.

Commit migrated from https://github.com/dotnet/corefx/commit/1ea12d43e92e9ceb0c28157d81ffd6224cf05706

5 years agoMerge pull request dotnet/corefx#39222 from eiriktsarpalis/fix-ignored-settings-ack
Eirik Tsarpalis [Thu, 11 Jul 2019 11:06:47 +0000 (12:06 +0100)]
Merge pull request dotnet/corefx#39222 from eiriktsarpalis/fix-ignored-settings-ack

Http2LoopbackConnection: Wait for pending ACK before setting up for new ignored settings frames

Commit migrated from https://github.com/dotnet/corefx/commit/a393ffee970c6d962c5830bb1c6fa4c3a3e268a6

5 years agoDisable GCNotificationTests test (dotnet/corefx#39375)
Stephen Toub [Thu, 11 Jul 2019 03:55:22 +0000 (23:55 -0400)]
Disable GCNotificationTests test (dotnet/corefx#39375)

Commit migrated from https://github.com/dotnet/corefx/commit/cb0ade0e10e168873d35d10b9ba118e9bfde029f

5 years agoExclude built-in HttpContent types from duplex with SocketsHttpHandler's HTTP/2 ...
Stephen Toub [Thu, 11 Jul 2019 03:31:30 +0000 (23:31 -0400)]
Exclude built-in HttpContent types from duplex with SocketsHttpHandler's HTTP/2 (dotnet/corefx#39352)

For 3.0:
- Adds an internal virtual AllowDuplex to HttpContent that defaults to true
- Override that on all of our HttpContent-derived types to return false
- SocketsHttpHandler's HTTP/2 implementation checks that, and if it returns false, awaits the sending of the request body as part of SendAsync.

Post-3.0, we'll revisit, likely with public surface area.

Commit migrated from https://github.com/dotnet/corefx/commit/e75dd151c9e5aa94cf33c7c9d14a53180df747dd

5 years agoAdd timer firing test for very long timers (dotnet/corefx#39311)
Stephen Toub [Thu, 11 Jul 2019 03:29:30 +0000 (23:29 -0400)]
Add timer firing test for very long timers (dotnet/corefx#39311)

Commit migrated from https://github.com/dotnet/corefx/commit/1cf1d5d89da25ab2a163aaf760eb5861c7d4875e

5 years agoAdd comment for Discard.
Cory Nelson [Thu, 11 Jul 2019 03:19:41 +0000 (20:19 -0700)]
Add comment for Discard.

Commit migrated from https://github.com/dotnet/corefx/commit/fd83c71e4e5ef5b21f04ceff9f5c535f92c082ce

5 years agoOptimize out an array allocation
Cory Nelson [Thu, 11 Jul 2019 02:55:38 +0000 (19:55 -0700)]
Optimize out an array allocation

Commit migrated from https://github.com/dotnet/corefx/commit/69b57934d5fa13147b44908e5a9d9d2e01e5d9bc

5 years agoAdd support for types derived from supported BCL collections (dotnet/corefx#39001)
Layomi Akinrinade [Thu, 11 Jul 2019 02:16:02 +0000 (22:16 -0400)]
Add support for types derived from supported BCL collections (dotnet/corefx#39001)

* Add support for types derived from supported BCL collections

* Fix merge issues

* Re-add commented-out tests

* Address review comments

Commit migrated from https://github.com/dotnet/corefx/commit/6005a1ed7772772e211a962141cb17dfc4e26539

5 years agoAdded CompleteAsync to PipeReader and PipeWriter (dotnet/corefx#39255)
David Fowler [Thu, 11 Jul 2019 01:29:09 +0000 (18:29 -0700)]
Added CompleteAsync to PipeReader and PipeWriter (dotnet/corefx#39255)

* Added CompleteAsync to PipeReader and PipeWriter
- Since the introduction of PipeReader and PipeWriter wrappers over a Stream, we need the ability to asynchronously flush buffered data to the stream on complete. This can happen if GetMemory/Advance is called without calling FlushAsync and today that results in data truncation. This change introuduces a way to asynchronously complete a PipeReader or PipeWriter so that we can flush buffered data asynchronously and also dispose the underlying Stream asynchronously.
- Changed StreamPipeWriter to synchronously write and flush buffered data in Complete and asynchronously write and flush buffered data in CompleteAsync.
- Added some tests.
- The DefaultPipeReader and DefaultPipeWriter don't have this problem so they are using the default implementation (which delegates to the syncrhonous Complete).

Commit migrated from https://github.com/dotnet/corefx/commit/ae79f49a7aa96cc6a8be59bb09b2246150587392

5 years agoFix VB string tests on non-english cultures (dotnet/corefx#39361)
Miha Zupan [Thu, 11 Jul 2019 01:23:32 +0000 (03:23 +0200)]
Fix VB string tests on non-english cultures (dotnet/corefx#39361)

`CurrentUICulture` can be en-US even if the `CurrentCulture` used for number formatting is not.

Commit migrated from https://github.com/dotnet/corefx/commit/d2f78d70ff76f9f25402cd0139bbabe7ec2dac4c

5 years agochecking if empty string is an installed font (dotnet/corefx#39309)
Anirudh Agnihotry [Thu, 11 Jul 2019 00:27:24 +0000 (17:27 -0700)]
checking if empty string is an installed font (dotnet/corefx#39309)

* checking if empty string is an installed font

* Not running font converter tests for netfx and disposing the installed FOnts object

Commit migrated from https://github.com/dotnet/corefx/commit/06f5035b13bd25c05d1d2810de8db81403e86e4f

5 years agoAlign date time parsing with 8601 spec (dotnet/corefx#39187)
Jeremy Kuhne [Wed, 10 Jul 2019 22:19:37 +0000 (15:19 -0700)]
Align date time parsing with 8601 spec (dotnet/corefx#39187)

* Align date time parsing with 8601 spec

- Clarifies what specification pieces we're adhering to
- Reorganize code to expect completely valid UTF-8 sequence
- Add corner cases and fix a few issues
- Restructure parser to attempt to clarify state
- Keep state in struct to avoid passing several parameters

* Address feedback

Commit migrated from https://github.com/dotnet/corefx/commit/1247fa7a193e52bc89bc49c4ba6e44739df2dcee

5 years agomaking test as outerloop (dotnet/corefx#39365)
Anirudh Agnihotry [Wed, 10 Jul 2019 22:16:49 +0000 (15:16 -0700)]
making test as outerloop (dotnet/corefx#39365)

Commit migrated from https://github.com/dotnet/corefx/commit/df2673a2bf08b3d027704ed64f2c4aeedc44d89e

5 years agoRemove System.Reflection.Emit from ApiCompat baselines (dotnet/corefx#39346)
William Godbe [Wed, 10 Jul 2019 22:00:37 +0000 (15:00 -0700)]
Remove System.Reflection.Emit from ApiCompat baselines (dotnet/corefx#39346)

Commit migrated from https://github.com/dotnet/corefx/commit/de3902bb56f1254ec1af4bf7d092fc2c048734cc

5 years agoMarking the test with outerloop attribute (dotnet/corefx#39349)
Anirudh Agnihotry [Wed, 10 Jul 2019 19:58:23 +0000 (12:58 -0700)]
Marking the test with outerloop attribute (dotnet/corefx#39349)

* making the test outerloop

* adding comment

Commit migrated from https://github.com/dotnet/corefx/commit/5e44821bd670530cd2bf1dd330079f6e2d8e5284

5 years agoDelete deadcode identified by the ILLinker update (dotnet/corefx#39347)
Jan Kotas [Wed, 10 Jul 2019 13:41:53 +0000 (06:41 -0700)]
Delete deadcode identified by the ILLinker update (dotnet/corefx#39347)

Commit migrated from https://github.com/dotnet/corefx/commit/1a26c1617216c078e725ed0a697b93e2cc5d3074

5 years ago[master] Update dependencies from dotnet/arcade (dotnet/corefx#39279)
dotnet-maestro[bot] [Wed, 10 Jul 2019 09:52:56 +0000 (11:52 +0200)]
[master] Update dependencies from dotnet/arcade (dotnet/corefx#39279)

* Update dependencies from https://github.com/dotnet/arcade build 20190708.1

- Microsoft.DotNet.XUnitExtensions - 2.4.1-beta.19358.1
- Microsoft.DotNet.XUnitConsoleRunner - 2.5.1-beta.19358.1
- Microsoft.DotNet.VersionTools.Tasks - 1.0.0-beta.19358.1
- Microsoft.DotNet.ApiCompat - 1.0.0-beta.19358.1
- Microsoft.DotNet.Arcade.Sdk - 1.0.0-beta.19358.1
- Microsoft.DotNet.Build.Tasks.Configuration - 1.0.0-beta.19358.1
- Microsoft.DotNet.Build.Tasks.Feed - 2.2.0-beta.19358.1
- Microsoft.DotNet.Build.Tasks.Packaging - 1.0.0-beta.19358.1
- Microsoft.DotNet.CodeAnalysis - 1.0.0-beta.19358.1
- Microsoft.DotNet.CoreFxTesting - 1.0.0-beta.19358.1
- Microsoft.DotNet.GenAPI - 1.0.0-beta.19358.1
- Microsoft.DotNet.Helix.Sdk - 2.0.0-beta.19358.1
- Microsoft.DotNet.RemoteExecutor - 1.0.0-beta.19358.1
- Microsoft.DotNet.GenFacades - 1.0.0-beta.19358.1

* Remove code moved to arcade CoreFxTesting

* Disable deps generation on failing projects

* Manual darc update from build '20190709.4'

Commit migrated from https://github.com/dotnet/corefx/commit/dcf1c8f51bcdbd79e08cc672e327d50612690a25

5 years agoFix for System.ComponentModel.Annotations packaging (dotnet/corefx#39184)
Diego Vega [Wed, 10 Jul 2019 03:08:10 +0000 (21:08 -0600)]
Fix for System.ComponentModel.Annotations packaging (dotnet/corefx#39184)

* WIP: Fix for System.ComponentModel.Annotations packaging

We currently build assemblies for multiple targets from this source code. We didn't add conditions when we added new types to the API, which resulted in the .NET Standard assemblies containing types that are not implemented in all compliant platforms. This is tracked by dotnet/corefx#38849.

Whith this change, we are switching to harvesting assemblies from the previous stable package for older targets like .NET Standard 2.0 and .NET Framework, and just build the library for .NET Core 3.0 and .NET Standard 2.1.

* Eric's feedback

* Attempt to fix UAP

* Attempting different fix for UAP

Bring back UAP InboxOnTargetFramework entry and removing from suppressions.

* Yet another attempt to fix UAP

The exception message mentions uap10.0.16300, which has a separate assembly version in the baseline package index.

* Backing out attempts to fix UAP

* I believe this is the right fix for UAP

Fingers crossed

Commit migrated from https://github.com/dotnet/corefx/commit/aef8ed681c53f0e04733878e240c072036dd6679

5 years agoChange pipe options defaults to be -1 (dotnet/corefx#39338)
Stephen Toub [Wed, 10 Jul 2019 02:18:03 +0000 (22:18 -0400)]
Change pipe options defaults to be -1 (dotnet/corefx#39338)

* Change pipe options defaults to be -1

* Update PipeOptionsTests.cs

Commit migrated from https://github.com/dotnet/corefx/commit/9bf9ae013134c6ff88fd905bd13fe07da96b66b4

5 years agoPort of the VB Financial module (dotnet/corefx#31181) (dotnet/corefx#39147)
Edison Henrique Andreassy [Wed, 10 Jul 2019 00:49:48 +0000 (21:49 -0300)]
Port of the VB Financial module (dotnet/corefx#31181) (dotnet/corefx#39147)

* Port of the VB Financial module (dotnet/corefx#31181)

* Added more tests for the Financial module

* Skip some tests on alpine

Commit migrated from https://github.com/dotnet/corefx/commit/b6edaf0ac1ca42b48fd6c836f9bb472090d832a8

5 years agoBinplace dotnet sdk folder (dotnet/corefx#39291)
Viktor Hofer [Tue, 9 Jul 2019 21:44:46 +0000 (23:44 +0200)]
Binplace dotnet sdk folder (dotnet/corefx#39291)

Commit migrated from https://github.com/dotnet/corefx/commit/75ae0a9a0ccf29854080ee0fecc1f54f69a65b56

5 years agoReduce JIT and type load overhead in WinForms startup (dotnet/corefx#39315)
Michal Strehovský [Tue, 9 Jul 2019 21:37:53 +0000 (23:37 +0200)]
Reduce JIT and type load overhead in WinForms startup (dotnet/corefx#39315)

https://github.com/dotnet/corefx/pull/37853#discussion_r300974699

The existing code was trading startup perf for throughput in a codepath that is unlikely to be executed commonly. The common scenario is that the `UserPreferencesChanging` event is not fired for the entire lifetime of the app (I left an app listening for this event running for an hour of normal work and never once was the event fired. I then changed system colors to force it).

To set up the high performance path, we have to load two unique `Func` instantiations and JIT a generic method. It's likely the throughput optimization won't pay for itself in terms of CPU cycles even if someone does change quite a few settings.

Commit migrated from https://github.com/dotnet/corefx/commit/3c37204d825c567ead19d8b2d9513efca25dd7c8

5 years agoDon't close connection for responses to session based authentication and 100-Continue...
Tomas Weinfurt [Tue, 9 Jul 2019 19:25:14 +0000 (21:25 +0200)]
Don't close connection for responses to session based authentication and 100-Continue (dotnet/corefx#38744)

* don't close connection for responses to session based authenticatin

* move sendRequestContentTask

* feedback from review

Commit migrated from https://github.com/dotnet/corefx/commit/2e73965a126946afc986175fd667ce3c31f03731

5 years agoFix param name in System.Collllections that slipped through when adding nullable...
Santiago Fernandez Madero [Tue, 9 Jul 2019 18:50:33 +0000 (11:50 -0700)]
Fix param name in System.Collllections that slipped through when adding nullable annotations (dotnet/corefx#39305)

Commit migrated from https://github.com/dotnet/corefx/commit/3293517906c213293201ced602bb49d90d20ad39

5 years agoFixing issue happenning on very large zip files (dotnet/corefx#39099)
buyaa-n [Tue, 9 Jul 2019 16:49:17 +0000 (09:49 -0700)]
Fixing issue happenning on very large zip files (dotnet/corefx#39099)

Fixing issue happenning on very large zip files dotnet/corefx#39099

Commit migrated from https://github.com/dotnet/corefx/commit/78589e4d2c98bf71cefa4dbc94cde3783b60a934

5 years agoDisable TaskDropsExecutionContextUponCompletion test
Stephen Toub [Tue, 9 Jul 2019 12:42:16 +0000 (08:42 -0400)]
Disable TaskDropsExecutionContextUponCompletion test

Commit migrated from https://github.com/dotnet/corefx/commit/01e6dd5a99c8134f7c585758b8e0a71f2120728a

5 years agoDisable AsyncMethodsDropsStateMachineAndExecutionContextUponCompletion test
Stephen Toub [Tue, 9 Jul 2019 12:41:12 +0000 (08:41 -0400)]
Disable AsyncMethodsDropsStateMachineAndExecutionContextUponCompletion test

Commit migrated from https://github.com/dotnet/corefx/commit/9f9b7c0930e8c8fcd9696410ce2bd0dbc9ac37ab

5 years agoAdd RIDs for released/releasing OS/Distro versions
Jeremy Barton [Tue, 9 Jul 2019 03:11:30 +0000 (20:11 -0700)]
Add RIDs for released/releasing OS/Distro versions

* Alpine 3.10 just released
* Alpine 3.11 has a project page with a projected 4 month due date
* FreeBSD 11.3 is imminent

Not added:

* CentOS has a project page for CentOS 8 but it's still described as ambiguous future
* Oracle Linux 8.1 isn't being added to mirror RHEL 8.1 because OL 8.0 has not yet released

Commit migrated from https://github.com/dotnet/corefx/commit/00e9443746b9e2d022a09d70d11d6ee2acd2a341

5 years agoUpdate APICompat baselines
wtgodbe [Mon, 8 Jul 2019 19:24:15 +0000 (12:24 -0700)]
Update APICompat baselines

Commit migrated from https://github.com/dotnet/corefx/commit/50de5595f53213990c245accce6b933a1589cbb9

5 years agoDon't recheck for attributes if the path is too long (dotnet/corefx#39299)
Jeremy Kuhne [Tue, 9 Jul 2019 03:05:26 +0000 (20:05 -0700)]
Don't recheck for attributes if the path is too long (dotnet/corefx#39299)

One of our existing tests hits this on some machines. There is no point in retrying if the path is too long and we don't want to add it to the assert either.

Fixes dotnet/corefx#39048

Commit migrated from https://github.com/dotnet/corefx/commit/af2e995a851fe0d218b8c9d17e08b0802150b102

5 years agoUse Uri.OriginalString when serializing (dotnet/corefx#39015)
Jeremy Kuhne [Mon, 8 Jul 2019 21:06:56 +0000 (14:06 -0700)]
Use Uri.OriginalString when serializing (dotnet/corefx#39015)

* Use Uri.OriginalString when serializing

We want to be lossless if possible when round tripping (outside of escaping). To do so we need to write OriginalString instead of using ToString().

Removing pending issue reference as it was closed (we won't be adding a Uri parser to the reader).

Add user reported scenario.

* Address feedback

Commit migrated from https://github.com/dotnet/corefx/commit/398dc98e66b1fa59d67e7977a667b95c5e5f5135

5 years agoFix inconsistent behavior in VersionConverter and UriTypeConverter with full framewor...
Roman Marusyk [Mon, 8 Jul 2019 17:08:37 +0000 (20:08 +0300)]
Fix inconsistent behavior in VersionConverter and UriTypeConverter with full framework (dotnet/corefx#39203)

* Fix inconsistent behavior in VersionConverter and UriTypeConverter with full framework

* Add test cases

* Add using

Commit migrated from https://github.com/dotnet/corefx/commit/ed5b558c8637dc9628ff62322784975238baaf88

5 years agoFix p/invoke declaration of GetUserObjectInformationW (dotnet/corefx#39285)
Michal Strehovský [Mon, 8 Jul 2019 16:20:04 +0000 (18:20 +0200)]
Fix p/invoke declaration of GetUserObjectInformationW (dotnet/corefx#39285)

Port of dotnet/winformsdotnet/corefx#1247.

Commit migrated from https://github.com/dotnet/corefx/commit/7d4b620cf7bcda28ed276c00e27def9d42e06c7c

5 years agoRename JsonCamelCaseNamePolicy -> JsonCamelCaseNamingPolicy (dotnet/corefx#39273)
Roman Marusyk [Mon, 8 Jul 2019 13:01:19 +0000 (16:01 +0300)]
Rename JsonCamelCaseNamePolicy -> JsonCamelCaseNamingPolicy (dotnet/corefx#39273)

Commit migrated from https://github.com/dotnet/corefx/commit/9f2cd6683e7488773c18f6fa2017ab181ba2cdcd

5 years agomake ExpectSettingsAck timeout parameter optional
Eirik Tsarpalis [Mon, 8 Jul 2019 09:21:25 +0000 (10:21 +0100)]
make ExpectSettingsAck timeout parameter optional

Commit migrated from https://github.com/dotnet/corefx/commit/5787e8ec90207b400e4f9fc13cd51a31fb48adfc

5 years agoEnsure BitArray unsafe accesses are within bounds (dotnet/corefx#39270)
Stephen Toub [Mon, 8 Jul 2019 03:00:23 +0000 (23:00 -0400)]
Ensure BitArray unsafe accesses are within bounds (dotnet/corefx#39270)

To avoid any potential issues that could arise from concurrent mutation of a BitArray while its doing unsafe processing (e.g. one thread calling And/Or/Xor while another thread resizes the BitArray via set_Length), this changes the implementations that use unsafe code to operate on a local snapshot that's fully validated locally.

Commit migrated from https://github.com/dotnet/corefx/commit/3b426f78a3aab1a45f797ac22e70fd203165d810

5 years agoDisable ConnectAsync_AddHostHeader_Success test (dotnet/corefx#39272)
Stephen Toub [Sun, 7 Jul 2019 22:17:19 +0000 (18:17 -0400)]
Disable ConnectAsync_AddHostHeader_Success test (dotnet/corefx#39272)

Commit migrated from https://github.com/dotnet/corefx/commit/480727f253bbe53bd94376830f3d4e645ee90ed0

5 years agoDon't force flush for data packets in SocketsHttpHandler HTTP/2 (dotnet/corefx#39236)
Stephen Toub [Sat, 6 Jul 2019 22:45:11 +0000 (18:45 -0400)]
Don't force flush for data packets in SocketsHttpHandler HTTP/2 (dotnet/corefx#39236)

* Don't force flush for data packets in SocketsHttpHandler HTTP/2

Allow the write stream to request a flush via FlushAsync, but don't internally force a flush on each data packet.

* Address PR feedback

Also tweak use of ArrayBuffer.ActiveSpan/Memory.Length to just ArrayBuffer.ActiveLength.

Commit migrated from https://github.com/dotnet/corefx/commit/15abdfc3816352c64098735b79a98dd97524ee36

5 years agoFix System.Diagnostics.Process failures with disabled Remote Registry service (dotnet...
Jan Kotas [Sat, 6 Jul 2019 20:46:32 +0000 (13:46 -0700)]
Fix System.Diagnostics.Process failures with disabled Remote Registry service (dotnet/corefx#39215)

* Fix System.Diagnostics.Process failures with disabled Remote Registry service

* Make the test more similar to other tests that depend on performance counters

Commit migrated from https://github.com/dotnet/corefx/commit/da2cf2d7e6976b13cbc24eb9ae7d98b630dd3be3

5 years agoRemove unused code from Linux crypto shim
Jeremy Barton [Sat, 6 Jul 2019 02:47:55 +0000 (19:47 -0700)]
Remove unused code from Linux crypto shim

* Remove uncalled methods in Interop.Crypto and clean using-imports

* Remove uncalled DLLEXPORT functions and their now-unused portable funcs.

Remove unused code from the crypto shim so that we don't pay a maintenance cost on it going forward.

Some functions have just fallen out of use slowly, others were shifts that left the old version intact just-in-case.

* Pass 1: For each file in the cryptoshim Interop directory (from X509Certificates, Algorithms, Encoding, and System.Net.Security) delete any methods that are uncalled.
* Pass 2: Delete anything in the shim that was abandoned by pass 1
Be surprised at things like CryptoNative_DsaCreate, which had a DllImport and a .h declaration, but no body.
* Pass 3: grep DLLEXPORT *.h, delete anything that is not mapped to by a DllImport
* Pass 4: Delete any function pointers that get bound during the portable build load but are no longer used (by this change)

It was less removal than anticipated. No audit was done that each function pointer that's bound is actually still used (other than the ones that had a usage reduced in this change); it felt less valuable per unit of time expended.

Commit migrated from https://github.com/dotnet/corefx/commit/6c6d68558aaccbd16de6e84cf7e59c0fb32b8273

5 years agoFix a race in buffer usage of Http2Connection.ProcessPingFrame: incoming buffer might...
Cory Nelson [Fri, 5 Jul 2019 23:03:00 +0000 (16:03 -0700)]
Fix a race in buffer usage of Http2Connection.ProcessPingFrame: incoming buffer might be reused before we've sent it. Resolve dotnet/corefx#38788.

Commit migrated from https://github.com/dotnet/corefx/commit/1a2c478ee975a1214afc7f23c75e3e99c292c521

5 years agoAdd RHEL 8.1 runtime id to the runtime id graph
Omair Majid [Fri, 5 Jul 2019 20:58:50 +0000 (16:58 -0400)]
Add RHEL 8.1 runtime id to the runtime id graph

RHEL 8.1 is expected to release around 6 months after RHEL 8.0. That
would put it around Nov 2019. If it follows the RHEL 7 tradition, it
should get identified as 'rhel.8.1`.

Commit migrated from https://github.com/dotnet/corefx/commit/8a02800c1e8002302bcc9340fe59eb8e199c9817

5 years agoEnable XUnit Analyzers (dotnet/corefx#38676)
Viktor Hofer [Fri, 5 Jul 2019 20:50:57 +0000 (22:50 +0200)]
Enable XUnit Analyzers (dotnet/corefx#38676)

* Enable XUnit Analyzers

Commit migrated from https://github.com/dotnet/corefx/commit/b8a7f34e1b64e5c594f591aa8683f34506eb9736