platform/upstream/dotnet/runtime.git
5 years agoUse X509_check_host when available instead of a custom implementation.
Jeremy Barton [Fri, 3 May 2019 23:51:42 +0000 (16:51 -0700)]
Use X509_check_host when available instead of a custom implementation.

X509_check_host was added in OpenSSL 1.0.2, but the Debian 8 line is still
on 1.0.1, so keep our version as a fallback.

The local_ implementation was changed to support wildcard CN values in
3+ label names, because OpenSSL X509_check_host does, too.

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

5 years agoUpdate doc for Preview 5 (dotnet/corefx#37433)
Steve Harter [Fri, 3 May 2019 23:03:07 +0000 (16:03 -0700)]
Update doc for Preview 5 (dotnet/corefx#37433)

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

5 years agoDisable GetPropertyValues_NotStoredProperty_ValueEqualsNull test (dotnet/corefx#37420)
Stephen Toub [Fri, 3 May 2019 21:34:24 +0000 (17:34 -0400)]
Disable GetPropertyValues_NotStoredProperty_ValueEqualsNull test (dotnet/corefx#37420)

* Disable GetPropertyValues_NotStoredProperty_ValueEqualsNull test

* Disable the other test as well

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

5 years agoLog exceptions from asynchronously failing Expect: 100-continue sends (dotnet/corefx...
Stephen Toub [Fri, 3 May 2019 21:33:55 +0000 (17:33 -0400)]
Log exceptions from asynchronously failing Expect: 100-continue sends (dotnet/corefx#37391)

* Log exceptions from asynchronously failing Expect: 100-continue sends

When Expect: 100-continue is used, the sending of the request body content is allowed to run concurrently with the receipt of the response headers.  If the processing of the response headers encounters an exception, we currently fail to ever join with that send task, which results in a TaskScheduler.UnobservedTaskException event.  This PR changes to observe the exception in such cases and log it.

(In doing so, I also came across an async void method, and changed all of the remaining ones in the assembly to be async Task instead.  The current implementation of async void isn't any cheaper than async Task, and is actually more expensive in certain ways, plus it unnecessarily interacts with any SynchronizationContext that may exist.)

* Address PR feedback

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

5 years agoUse RemoveInvoke in several StringTests (dotnet/corefx#37417)
Stephen Toub [Fri, 3 May 2019 20:23:17 +0000 (16:23 -0400)]
Use RemoveInvoke in several StringTests (dotnet/corefx#37417)

Every test that modifies CurrentCulture should be run out-of-process (to avoid one test interfering with another, either due to leaving a thread configured inappropriately or due to platforms where changing culture actually has global impact).  A few snuck in to StringTests that weren't, and we've seen sporadic failures as a result.

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

5 years agoPort AssemblyInfo, ConsoleApplicationBase.CommandLineArgs, ComputerInfo.*Memory ...
Charles Stoner [Fri, 3 May 2019 19:41:33 +0000 (12:41 -0700)]
Port AssemblyInfo, ConsoleApplicationBase.CommandLineArgs, ComputerInfo.*Memory (dotnet/corefx#37413)

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

5 years agoBetter support RSAES_OAEP certificates for EnvelopedCms
Kevin Jones [Fri, 3 May 2019 15:05:38 +0000 (11:05 -0400)]
Better support RSAES_OAEP certificates for EnvelopedCms

Improve the .NET Core EnvelopedCms support on Windows for certificates whose public key says the algorithm is RSA-OAEP to restore .NET Framework-equivalent capability.

Linux and macOS cannot reliably represent those certificates as an X509Certificate2, so their support is unchanged at this time.

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

5 years agoFix Macedonian display name in ComponentModel CultureInfo converter (dotnet/corefx...
Tarek Mahmoud Sayed [Fri, 3 May 2019 14:23:42 +0000 (07:23 -0700)]
Fix Macedonian display name in ComponentModel CultureInfo converter (dotnet/corefx#37390)

* Fix Macedonian display name in ComponentModel CultureInfo converter

* Fix the comment

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

5 years agoPort Constants, Globals, DateAndTime (dotnet/corefx#37376)
Charles Stoner [Fri, 3 May 2019 14:21:35 +0000 (07:21 -0700)]
Port Constants, Globals, DateAndTime (dotnet/corefx#37376)

* Port Constants, Globals, DateAndTime

* PR feedback

* Add DateString test

* Remove using

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

5 years agoUpdate ProjectNTfs, ProjectNTfsTestILC to beta-27703-00, beta-27703-00, respectively...
dotnet-maestro-bot [Fri, 3 May 2019 14:21:01 +0000 (07:21 -0700)]
Update ProjectNTfs, ProjectNTfsTestILC to beta-27703-00, beta-27703-00, respectively (dotnet/corefx#37356)

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

5 years agoTweak asserts used in GetGCMemoryInfo test to be more informative (dotnet/corefx...
Stephen Toub [Fri, 3 May 2019 14:13:07 +0000 (10:13 -0400)]
Tweak asserts used in GetGCMemoryInfo test to be more informative (dotnet/corefx#37387)

With Assert.True, all we know is whether the test passed or failed.  With Assert.Equal and Assert.InRange, a failure will include information about the input values.

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

5 years agoFix build break in HttpClientHandlerTest
Viktor Hofer [Fri, 3 May 2019 10:23:37 +0000 (12:23 +0200)]
Fix build break in HttpClientHandlerTest

Caused by https://github.com/dotnet/corefx/commit/dotnet/corefx@c412fa7dc60559dc38050c63b2e34b5156a2499e

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

5 years agoimprove error handling on failed Http/2 handshake (dotnet/corefx#37050)
Tomas Weinfurt [Fri, 3 May 2019 06:31:53 +0000 (23:31 -0700)]
improve error handling on failed Http/2 handshake (dotnet/corefx#37050)

* improve error handling on failed Http/2 handshake

* remove extra space

* add test for HTTP2 client talking to HTTP1 server.

* fix broken tests

* improve exception handling

* update exception handling

* ws update

* fix bad merge

* update test and changes from dotnet/corefx#37223

* use _abortException only if the stream is not aborted already

* fix IsAborted check

* updates to syncup with recent changes

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

5 years agoreject invalid pseudo-headers (dotnet/corefx#37069)
Tomas Weinfurt [Fri, 3 May 2019 06:23:27 +0000 (23:23 -0700)]
reject invalid pseudo-headers (dotnet/corefx#37069)

* reject invalid pseudo-headers

* feedback from review

* feedback from review

* fix typo in comment

* feedback from review

* syncup with recent changes

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

5 years agoimpove error reporting on OSX (dotnet/corefx#37382)
Tomas Weinfurt [Fri, 3 May 2019 04:13:20 +0000 (21:13 -0700)]
impove error reporting on OSX (dotnet/corefx#37382)

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

5 years agoFix TestPriorityLevelProperty test (dotnet/corefx#37377)
Stephen Toub [Fri, 3 May 2019 00:29:58 +0000 (20:29 -0400)]
Fix TestPriorityLevelProperty test (dotnet/corefx#37377)

* Fix TestPriorityLevelProperty test

If the target thread goes away between the time we grab it and try to manipulate it, the test fails.  Instead, just create a thread in the current process, as we can then target that one directly and ensure it's always in a good state for testing against.

* Address PR feedback

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

5 years agoStart on object serialization. (dotnet/corefx#36806)
Jeremy Kuhne [Thu, 2 May 2019 18:58:42 +0000 (11:58 -0700)]
Start on object serialization. (dotnet/corefx#36806)

* Add JsonElement to object support

Object and object[] properties now get JsonElement for their value when deserializing. When serializing out the JsonElements are rehydrated into their original Json.

* Remove the done TODO

* Add JsonElement property tests.

* Initial complex object/JsonElement support. Skipping one test temporarily.

* Add Skip condition and reenable test.

* Address feedback.

* Address more feedback, add more tests.

* Addressing feedback.

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

5 years agoFix SendAsync_No100ContinueReceived_RequestBodySentEventually test flakiness (dotnet...
Stephen Toub [Thu, 2 May 2019 18:56:19 +0000 (14:56 -0400)]
Fix SendAsync_No100ContinueReceived_RequestBodySentEventually test flakiness (dotnet/corefx#37371)

The server in the test was sending down the entire response and then trying to read the data from the client.  If the client sent its whole payload and read the response before the server go around to doing the read, the client might close the connection, in which case the read might fail.  The fix just changes the server code to only send down the headers, then read the data from the client, and only then finish the response, at which point it's fine if the client closes the connection.

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

5 years agoFix MultipleCallsToGetSpan test with pinning (dotnet/corefx#37373)
Stephen Toub [Thu, 2 May 2019 18:41:02 +0000 (14:41 -0400)]
Fix MultipleCallsToGetSpan test with pinning (dotnet/corefx#37373)

The test is getting two pointers to an array and validating that they're the same pointer.  But if the array is moved by the GC between the two calls, the test fails.  The fix is to pin the array.

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

5 years agoPorts System.Data.OleDb (dotnet/corefx#37101)
Maryam Ariyan [Thu, 2 May 2019 17:42:33 +0000 (10:42 -0700)]
Ports System.Data.OleDb (dotnet/corefx#37101)

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

5 years agoTweak preferLocal value in System.Net.Sockets (dotnet/corefx#37369)
Stephen Toub [Thu, 2 May 2019 17:29:40 +0000 (13:29 -0400)]
Tweak preferLocal value in System.Net.Sockets (dotnet/corefx#37369)

These ThreadPool.UnsafeQueueUserWorkItem calls come from a non-thread pool thread, and as such currently the preferLocal argument has no effect and was defaulted to false when this was written.  But logically it makes sense for it to be true, and it could start to have an effect if we make a change to the thread pool that allows threads to share their local queues.

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

5 years agoFix test failure in XmlWriterTraceListenerTests.ListenerWithFilter (dotnet/corefx...
Stephen Toub [Thu, 2 May 2019 17:17:54 +0000 (13:17 -0400)]
Fix test failure in XmlWriterTraceListenerTests.ListenerWithFilter (dotnet/corefx#37368)

This test randomly and somewhat amusingly failed in CI.  The test validates that a particular value passed into one of the writer's methods doesn't show up in the output, but the writer also outputs the current process ID, and the process ID happened to match that value.  The fix is to just ensure it doesn't.

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

5 years agoSurround InvalidLargeEncode outerloop test with try-catch to avoid OOM (dotnet/corefx...
Ahson Khan [Thu, 2 May 2019 17:04:58 +0000 (10:04 -0700)]
Surround InvalidLargeEncode outerloop test with try-catch to avoid OOM (dotnet/corefx#37355)

* Disable InvalidLargeEncode test on x86 to prevent OOM

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

5 years agoDisable flaky Dns GetHostName tests on OSX (dotnet/corefx#37363)
Viktor Hofer [Thu, 2 May 2019 14:32:27 +0000 (16:32 +0200)]
Disable flaky Dns GetHostName tests on OSX (dotnet/corefx#37363)

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

5 years agoNop LongProcessNamesAreSupported test on Alpine (dotnet/corefx#37350)
Santiago Fernandez Madero [Thu, 2 May 2019 06:28:49 +0000 (23:28 -0700)]
Nop LongProcessNamesAreSupported test on Alpine (dotnet/corefx#37350)

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

5 years agoEnable HTTP/2 in SocketsHttpHandler via HttpRequestMessage.Version (dotnet/corefx...
Stephen Toub [Thu, 2 May 2019 04:15:28 +0000 (00:15 -0400)]
Enable HTTP/2 in SocketsHttpHandler via HttpRequestMessage.Version (dotnet/corefx#37234)

We now respect the version: if it's 1.1, we use 1.1, and if it's 2.0, we try to use HTTP/2.  At the same time, the default for HttpRequestMessage.Version goes back to 1.1, so to use HTTP/2, you opt-in by setting the version explicitly to 2.0.

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

5 years agoTypos etc (dotnet/corefx#37349)
Dan Moseley [Thu, 2 May 2019 04:14:26 +0000 (21:14 -0700)]
Typos etc (dotnet/corefx#37349)

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

5 years agoDisable GetAsync_UnicodeHostName_SuccessStatusCodeInResponse test
Stephen Toub [Thu, 2 May 2019 04:12:02 +0000 (00:12 -0400)]
Disable GetAsync_UnicodeHostName_SuccessStatusCodeInResponse test

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

5 years agoAdded Range Manipulation APIs to Collection<T> and ObservableCollection<T> (dotnet...
Andrew Hoefling [Thu, 2 May 2019 03:57:56 +0000 (23:57 -0400)]
Added Range Manipulation APIs to Collection<T> and ObservableCollection<T> (dotnet/corefx#35772)

* Added Collection<T> AddRange and InsertRange and added new XUnit tests to cover new APIs

Added missing APIs from Collection<T>; Added new unit tests for RemoveRange, ReplaceRange, InsertItemsRange and RemoveItemsRange

Updated AddRange in Collection<T> to add items to the end of the collection

Added CollectionChanged tests for ObservableCollection<T> for InsertRange, AddRange, RemoveRange and ReplaceRange

Removing API changes as these will be mirrored from CoreCLR

Updated array assertions to use Span<T> to simplify logic

Sorted order of new API methods

Simplified CollectionTests Assertion to use Span<T> instead of calling out each item in the array

Added missing API ReplaceItemsRange and updated unit tests for check for overflow errors on RemoveItems

Added overrides for ObservableCollection<T> ItemsRange API to only fire CollectionChanged once per API call. Before this was firing for each item in the collection which is not the desired result. Updated unit tests to verify this logic

Updated RemoveItemsRange to prevent int.MaxValue overflow errors

Added int.MaxValue overflow tests for Collection<T> and ObservableCollection<T> when invoking RemoveItemsRange API

Added additional RemoveRange unit tests to cover when Count is Less than 0 or when Count is 0

Updated RemoveRange overflow tests to check for ArgumentException for new business rules

Updated ObservableCollection overflow test to assert ArgumentException

Added try-finally block to ObservableCollection<T> to certify that _skipCollectionChanged is always set to false after a collection manipulation in case an exception is thrown in a subclass. Added new test class to test the new rules on the example of a NonNullObservableCollection<T>

CollectionChanged events do not fire on RemoveRange if the count == 0

Updated ObservableCollection<T> to only throw the 3 required events when ReplaceItemsRange is invoked. Updated OnChangedEvent methods to check for IList and cast as necessary. Added additional exception handling to reset _skipRaisingEvents bool. Added unit tests to verify event and event parameters are being passed correctly.

Added Collection<T> AddRange and InsertRange and added new XUnit tests to cover new APIs

Simplified CollectionTests Assertion to use Span<T> instead of calling out each item in the array

Added additional RemoveRange unit tests to cover when Count is Less than 0 or when Count is 0

Updated ObservableCollection<T> to only throw the 3 required events when ReplaceItemsRange is invoked. Updated OnChangedEvent methods to check for IList and cast as necessary. Added additional exception handling to reset _skipRaisingEvents bool. Added unit tests to verify event and event parameters are being passed correctly.

Updated ReplaceRange event to pass in the OldItems and NewItems to match the event docs

Simplified CollectionChanged 'NewItems for InsertItemsRange

Updated removedItems to use an array instead of a List<T>

Added new OnCollectionChanged overloads to reduce need for additional if checks.

Removed stale code

Optimized ReplaceItemsRange by simplifying the itemsToReplace which is no an array instead of a List<T>

Removed (IList) cast in ReplaceItemsRange when raising CollectionChanged

Removed temp array in RemoveRange which decreases memory allocation needed

* Removed redudent AsSpan parameter in test code

* Removed stale code in test code

* Removed redundent Assert.NotNull calls in several tests

* Added additional check in InsertRange to verify the input collection.Count is greater than 0 before raising the events

* Removed stale code from the `NonNullObservableCollection<T>` test harness

* Removed unnecessary whitespace

* Renamed new API tests to include the .netcoreapp extension; Updated .Tests.csproj file to only run them when the project is built under .NET core as net standard is the default

* Renamed CollectionTests -> CollectionTests.netcoreapp.cs and only run the test if it is a netcoreapp as the new APIs aren't in netstandard yet

* Added UAP and UAPAOT build configurations for System.ObjectModel tests

* Updated ObservableCollection/Collection tests that use new APIs to be in a partial class with the .netcoreapp.cs extension and existings tests to be in the .cs file.

* Added CollectionTestBase as parent class for CollectionTests for the use case where the other tests are ignored in netstandard builds

* Adding using statements back in which were failing the build

* Moving private classes from the netcoreapp tests to the regular CollectionTests as they were not available in the netstandard CI test run

* Added missing using statement for colleciton tests

* Added if-block that certifies we have replaced items before raising the Replace Event on ReplaceItemsRange

* Removed whitespace in System.Runtime.Tests.csproj

* Added negative test case for ReplaceRange when no items are replaced

* Fixed issue with failing test

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

5 years agoMake ProcessTests.HandleCountChanges more reliable (dotnet/corefx#37330)
Stephen Toub [Thu, 2 May 2019 01:49:37 +0000 (21:49 -0400)]
Make ProcessTests.HandleCountChanges more reliable (dotnet/corefx#37330)

* Make ProcessTests.HandleCountChanges more reliable

* Address PR feedback

* Update CoreFx.Private.TestUtilities.csproj

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

5 years agoAdd JsonEncodedText with Utf8JsonWriter overloads that accept it (dotnet/corefx#37323)
Ahson Khan [Thu, 2 May 2019 01:46:28 +0000 (18:46 -0700)]
Add JsonEncodedText with Utf8JsonWriter overloads that accept it (dotnet/corefx#37323)

* Initial impl of JsonEncodedText with tests.

* Auto-generate the reference assembly.

* Update tests and ref assembly to include dummy field.

* Add JsonEncodedText overloads to Utf8JsonWriter with tests.

* Auto-gen the ref

* Address PR feedback.

* Fix typo - dispose the Utf8JsonWriter within serializer.

* Add XML comments to the new APIs and types.

* Alpha order the csproj.

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

5 years agoRun Microsoft.VisualBasic.Core.Tests sequentially (dotnet/corefx#37345)
Charles Stoner [Thu, 2 May 2019 00:21:05 +0000 (17:21 -0700)]
Run Microsoft.VisualBasic.Core.Tests sequentially (dotnet/corefx#37345)

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

5 years agoUpdate pullrequest-builds.md
Viktor Hofer [Wed, 1 May 2019 22:36:47 +0000 (00:36 +0200)]
Update pullrequest-builds.md

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

5 years agoFix condition for send to helix step in public builds (dotnet/corefx#37344)
Santiago Fernandez Madero [Wed, 1 May 2019 22:27:50 +0000 (15:27 -0700)]
Fix condition for send to helix step in public builds (dotnet/corefx#37344)

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

5 years agoImplement HttpClient.DefaultProxy property (dotnet/corefx#37333)
David Shulman [Wed, 1 May 2019 22:17:21 +0000 (15:17 -0700)]
Implement HttpClient.DefaultProxy property (dotnet/corefx#37333)

This PR implements the new static HttpClient.DefaultProxy property which was approved
during API review.

Modify the SystemProxyInfo.ConstructSystemProxy method to a Singleton.

Modify SocketsHttpHandler to use the HttpClient.DefaultProxy property.

Rename the HttpSystemProxy class to HttpWindowsProxy.

Add some HttpClient tests for the new property.

Closes dotnet/corefx#36553

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

5 years agoPublish test artifacts to AzDO (dotnet/corefx#37296)
Viktor Hofer [Wed, 1 May 2019 21:48:48 +0000 (23:48 +0200)]
Publish test artifacts to AzDO (dotnet/corefx#37296)

* Publish test artifacts to AzDO

* Disable two flaky UAP tests

* Remove leftover buildconfiguration for netfx

* Disable flaky printer test

* Disable flaky PipeWriter test

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

5 years agoRemove instances of myget in the docs and update to blob feed (dotnet/corefx#37334)
Santiago Fernandez Madero [Wed, 1 May 2019 21:16:11 +0000 (14:16 -0700)]
Remove instances of myget in the docs and update to blob feed (dotnet/corefx#37334)

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

5 years agoDisable AutomaticOrManual_DoesntFailRegardlessOfWhetherClientCertsAreAvailable test...
Stephen Toub [Wed, 1 May 2019 21:01:07 +0000 (17:01 -0400)]
Disable AutomaticOrManual_DoesntFailRegardlessOfWhetherClientCertsAreAvailable test (dotnet/corefx#37339)

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

5 years agoAllow Http2Connection header-related processing buffers to grow (dotnet/corefx#37337)
Stephen Toub [Wed, 1 May 2019 20:53:28 +0000 (16:53 -0400)]
Allow Http2Connection header-related processing buffers to grow (dotnet/corefx#37337)

They're currently hard-coded to have a max size.  We need to allow them to grow to deal with arbitrarily large headers. (Separately we'll want to enforce the max header size limit.)

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

5 years agoFix NullReferenceException when a trusted cert chain fails usage (dotnet/corefx#37318)
Jeremy Barton [Wed, 1 May 2019 20:03:19 +0000 (13:03 -0700)]
Fix NullReferenceException when a trusted cert chain fails usage (dotnet/corefx#37318)

* Fix NullReferenceException when a trusted cert chain fails usage

A previous change moved overallStatus to be created on demand, but if it made
it out to ProcessPolicy before finding the first error it didn't create it first.

While adding a test for that it was also discovered that the Windows and
Linux chains are inconsistent in where this particular error gets reported.

* Fix macOS setting of the NotValidForUsage flag

Also change the test to ignore revocation, to avoid macOS failing when it
doesn't want to check a CRL.

* Reuse one list for all elementStatus expansion

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

5 years agoUpdate ProjectNTfs, ProjectNTfsTestILC to beta-27701-01, beta-27701-01, respectively...
dotnet-maestro-bot [Wed, 1 May 2019 19:57:17 +0000 (12:57 -0700)]
Update ProjectNTfs, ProjectNTfsTestILC to beta-27701-01, beta-27701-01, respectively (dotnet/corefx#36873)

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

5 years agoSend to helix only when previous steps succeeded (dotnet/corefx#37332)
Santiago Fernandez Madero [Wed, 1 May 2019 19:06:41 +0000 (12:06 -0700)]
Send to helix only when previous steps succeeded (dotnet/corefx#37332)

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

5 years agoFix two more System.Net async instead of sync calls (dotnet/corefx#37329)
Stephen Toub [Wed, 1 May 2019 16:45:35 +0000 (12:45 -0400)]
Fix two more System.Net async instead of sync calls (dotnet/corefx#37329)

These were written as sync-over-async before the sync APIs were available.  Now that the sync APIs are available, use them.

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

5 years agoAdd ManualResetValueTaskSourceCore / AsyncIterateMethodBuilder to Microsoft.Bcl.Async...
Stephen Toub [Wed, 1 May 2019 15:57:35 +0000 (11:57 -0400)]
Add ManualResetValueTaskSourceCore / AsyncIterateMethodBuilder to Microsoft.Bcl.AsyncInterfaces (dotnet/corefx#37320)

* Add ManualResetValueTaskSourceCore / AsyncIterateMethodBuilder to Microsoft.Bcl.AsyncInterfaces

These two types needed modifications to target .NET Standard 2.0 and are the necessary pieces to enable the compiler to compile async iterators.

- Copied ManualResetValueTaskSourceCore.cs from coreclr and tweaked it.  I opted to do this rather than ifdef because the changes are not localized and I didn't want to significantly perturb the primary implementation.
- Added a few ifdefs to the shared AsyncIteratorMethodBuilder.  It already had ifdefs, so I just added to it.
- Added a test project, and included the existing ManualResetValueTaskSourceCore tests.  I had to disable two of the tests because of some of the optimization differences.
- Augmented those tests to validate that the compiler is able to successfully generate iterators and await foreach them.

* Address PR feedback

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

5 years agoUse Dns.GetHostAddresses in Socket.Connect (dotnet/corefx#37324)
dudu [Wed, 1 May 2019 15:10:57 +0000 (23:10 +0800)]
Use Dns.GetHostAddresses in Socket.Connect (dotnet/corefx#37324)

Replace Dns.GetHostAddressesAsync with Dns.GetHostAddresses in Socket.Connect

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

5 years agoRun tests only on public builds and scheduled or manual official builds (dotnet/coref...
Santiago Fernandez Madero [Wed, 1 May 2019 11:05:24 +0000 (04:05 -0700)]
Run tests only on public builds and scheduled or manual official builds (dotnet/corefx#37316)

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

5 years agoInternal Http SystemProxyInfo object should never be null (dotnet/corefx#37306)
David Shulman [Wed, 1 May 2019 04:14:02 +0000 (21:14 -0700)]
Internal Http SystemProxyInfo object should never be null (dotnet/corefx#37306)

In order to provide a consistent experience with the HttpClient IWebProxy objects,
the returned internal proxy object which represent the system/platform proxy settings
should never be null. If the platform's settings indicate that no proxy is being used,
then return an instance of the internal HttpNoProxy object.

Note that even if the platform settings indicate that a proxy could be used, any
particular Http request might still not go thru a proxy. The final determination of
what proxy is being used for a request is still governed by the return of the
IWebProxy.IsBypassed and IWebProxy.GetProxy methods.

Contributes to dotnet/corefx#36553

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

5 years agoupdate tests using "localhost" to be more liberal on verification of response address...
Tomas Weinfurt [Wed, 1 May 2019 03:31:00 +0000 (20:31 -0700)]
update tests using "localhost" to be more liberal on verification of response address. (dotnet/corefx#37284)

* update tests using "localhost"

* feedback from review

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

5 years agoAdding Microsoft.Bcl.AsyncInterfaces for .NET Standard 2.0 (dotnet/corefx#37189)
Jose Perez Rodriguez [Wed, 1 May 2019 02:24:33 +0000 (19:24 -0700)]
Adding Microsoft.Bcl.AsyncInterfaces for .NET Standard 2.0 (dotnet/corefx#37189)

* Adding Microsoft.Compatibility.AsyncInterfaces package

* Addressing PR Feedback

* Fix small typo

* Remove unnecesary configurations from the package

* Rename to Microsoft.Bcl.AsyncInterfaces

* Addressing PR Feedback

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

5 years agohandle EPROTOTYPE on OSX (dotnet/corefx#37208)
Tomas Weinfurt [Wed, 1 May 2019 02:05:55 +0000 (19:05 -0700)]
handle EPROTOTYPE on OSX (dotnet/corefx#37208)

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

5 years agoFix order of "static public" in test file
Stephen Toub [Wed, 1 May 2019 02:04:13 +0000 (22:04 -0400)]
Fix order of "static public" in test file

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

5 years agodisable ParallelQueryCombinationTests on ARM systems with high core count (dotnet...
Tomas Weinfurt [Wed, 1 May 2019 02:03:23 +0000 (19:03 -0700)]
disable ParallelQueryCombinationTests on ARM systems with high core count (dotnet/corefx#37319)

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

5 years agoAdd more UTF-16 validation tests (dotnet/corefx#37252)
Levi Broderick [Wed, 1 May 2019 01:51:57 +0000 (18:51 -0700)]
Add more UTF-16 validation tests (dotnet/corefx#37252)

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

5 years agoRemoving the System.Numerics.Vectors pkgproj (dotnet/corefx#37301)
Tanner Gooding [Wed, 1 May 2019 00:53:08 +0000 (17:53 -0700)]
Removing the System.Numerics.Vectors pkgproj (dotnet/corefx#37301)

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

5 years agoAdditional unit test cases for UTF-8 validation (dotnet/corefx#37162)
Levi Broderick [Wed, 1 May 2019 00:02:33 +0000 (17:02 -0700)]
Additional unit test cases for UTF-8 validation (dotnet/corefx#37162)

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

5 years agoEnable test for dotnet/coreclrdotnet/corefx#24191 (dotnet/corefx#37311)
Steve MacLean [Tue, 30 Apr 2019 22:45:21 +0000 (18:45 -0400)]
Enable test for dotnet/coreclrdotnet/corefx#24191 (dotnet/corefx#37311)

Enable SatelliteAssembly tests relying on dotnet/coreclrdotnet/corefx#24191

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

5 years agoAdd TokenStartIndex property to Utf8JsonReader and fix bug in ConsumeNumber (dotnet...
Ahson Khan [Tue, 30 Apr 2019 22:09:36 +0000 (15:09 -0700)]
Add TokenStartIndex property to Utf8JsonReader and fix bug in ConsumeNumber (dotnet/corefx#37167)

* Add TokenStartIndex property to Utf8JsonReader with basic tests.

* Add more token start index tests and fix bug in ConsumeNumber which was
throwing too aggressively.

* Update ref to match normalized alpha ordering.

* Use TokenStartIndex in more places, i.e. in JsonDocument.TryParseValue

* Address PR feedback.

* Restructure condition with string first to avoid duplication.

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

5 years ago[master] Update dependencies from dotnet/coreclr (dotnet/corefx#37298)
dotnet-maestro[bot] [Tue, 30 Apr 2019 20:40:12 +0000 (16:40 -0400)]
[master] Update dependencies from dotnet/coreclr (dotnet/corefx#37298)

* Update dependencies from https://github.com/dotnet/coreclr build 20190429.75

- Microsoft.NET.Sdk.IL - 3.0.0-preview6-27629-75
- Microsoft.NETCore.ILAsm - 3.0.0-preview6-27629-75
- Microsoft.NETCore.Runtime.CoreCLR - 3.0.0-preview6-27629-75

* Disable NullEncodingThrows test on all but netfx

* add precision

precision tests added and precision increased in current tests

fixing max value test

* Fixing tests for netfx

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

5 years agoMove to new BYOC pools (dotnet/corefx#37303)
Santiago Fernandez Madero [Tue, 30 Apr 2019 20:32:10 +0000 (13:32 -0700)]
Move to new BYOC pools (dotnet/corefx#37303)

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

5 years agoMerge pull request dotnet/corefx#37307 from dotnet/update-1904-image
Matt Galbraith [Tue, 30 Apr 2019 19:57:09 +0000 (12:57 -0700)]
Merge pull request dotnet/corefx#37307 from dotnet/update-1904-image

Update Docker image for Ubuntu 19.04

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

5 years agoUpdate Docker image for Ubuntu 19.04
Matt Galbraith [Tue, 30 Apr 2019 19:55:51 +0000 (12:55 -0700)]
Update Docker image for Ubuntu 19.04

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

5 years agoFix bad usage of ArrayPool in TdsParserStateObject (dotnet/corefx#37270)
Jeremy Barton [Tue, 30 Apr 2019 19:25:58 +0000 (12:25 -0700)]
Fix bad usage of ArrayPool in TdsParserStateObject (dotnet/corefx#37270)

If TdsParserStateObject.TryReadString or
TdsParserStateObject.TryReadStringWithEncoding hit the growth case they
would rent an array, save it into a field, use the array, return the array to the pool,
but keep it assigned to the field and continue using it.

Since other writes to _bTmp use fresh arrays in an instance-cached-growth
pattern, this change restores these two methods to that same approach, rather
than renting to a local buffer and not renting into a field.

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

5 years agoHarden several SocketsHttpHandler streams against unexpected Dispose (dotnet/corefx...
Stephen Toub [Tue, 30 Apr 2019 18:58:25 +0000 (14:58 -0400)]
Harden several SocketsHttpHandler streams against unexpected Dispose (dotnet/corefx#37299)

A few tweaks:
- We hand out the ChunkedEncodingWriteStream and ContentLengthWriteStream to an HttpContent.SerializeToStreamAsync.  If that user code disposes of the Stream, then we end up null ref'ing when we try to finish the processing.  We should instead throw a more descriptive error about the misuse.
- Make the non-pooled response streams slightly more robust against concurrent disposal (which is not a supported use, but it happens).

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

5 years agoAdd a test for Stopwatch.Elapsed to ensure it's within reason (dotnet/corefx#37279)
Stephen Toub [Tue, 30 Apr 2019 00:52:59 +0000 (20:52 -0400)]
Add a test for Stopwatch.Elapsed to ensure it's within reason (dotnet/corefx#37279)

If this experiences flakiness in CI, we can tweak it, replace it with something better, etc.

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

5 years agoRemove dotnet/sdkdotnet/corefx#3185 (dotnet/corefx#37289)
Steve MacLean [Tue, 30 Apr 2019 00:43:06 +0000 (20:43 -0400)]
Remove dotnet/sdkdotnet/corefx#3185 (dotnet/corefx#37289)

Issue closed

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

5 years agoMerge pull request dotnet/corefx#37287 from dotnet/add-ubuntu-1904
Matt Galbraith [Tue, 30 Apr 2019 00:34:55 +0000 (17:34 -0700)]
Merge pull request dotnet/corefx#37287 from dotnet/add-ubuntu-1904

Add Ubuntu 19.04 to official runs

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

5 years agoALC SatelliteAssemblies tests (dotnet/corefx#37248)
Steve MacLean [Tue, 30 Apr 2019 00:33:31 +0000 (20:33 -0400)]
ALC SatelliteAssemblies tests (dotnet/corefx#37248)

* Add AssemblyLoadCcontext SatelliteAssemblies tests

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

5 years agoAdd Ubuntu 19.04 to official runs
Matt Galbraith [Tue, 30 Apr 2019 00:27:02 +0000 (17:27 -0700)]
Add Ubuntu 19.04 to official runs

Add runs using Ubuntu.1904.Amd64 (docker image) ; this is an AMD image based off requirements used in ARM64 version.

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

5 years agoDisable failing Process name test (dotnet/corefx#37283)
Stephen Toub [Mon, 29 Apr 2019 22:28:34 +0000 (18:28 -0400)]
Disable failing Process name test (dotnet/corefx#37283)

https://github.com/dotnet/corefx/issues/37198
Regression caused by https://github.com/dotnet/corefx/pull/37144

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

5 years agoMaking BaseNumberConverter Internal (dotnet/corefx#37278)
Anirudh Agnihotry [Mon, 29 Apr 2019 22:27:05 +0000 (15:27 -0700)]
Making BaseNumberConverter Internal (dotnet/corefx#37278)

* type converter ctor made internal

* diasabling apicompat for the change

* Fixing uap app compat

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

5 years agoPlumb cancellation through SslStream.AuthenticateAsXxAsync (dotnet/corefx#37259)
Stephen Toub [Mon, 29 Apr 2019 22:24:48 +0000 (18:24 -0400)]
Plumb cancellation through SslStream.AuthenticateAsXxAsync (dotnet/corefx#37259)

We accept a CancellationToken into several of the overloads, but it's then dropped and not actually used.  This fixes that to ensure it's passed through to the underlying Read/WriteAsync operations.

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

5 years agoPort Microsoft.VisualBasic.MyServices.FileSystemProxy and move FileIOTests to C#...
Charles Stoner [Mon, 29 Apr 2019 21:48:19 +0000 (14:48 -0700)]
Port Microsoft.VisualBasic.MyServices.FileSystemProxy and move FileIOTests to C# (dotnet/corefx#37277)

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

5 years agoCleanup some WebSocket tests (dotnet/corefx#37271)
David Shulman [Mon, 29 Apr 2019 19:38:00 +0000 (12:38 -0700)]
Cleanup some WebSocket tests (dotnet/corefx#37271)

Skip some tests on .NET Framework due to bugs in .NET Framework.

Modify the TestCancellation helper method for the WebSocket client tests to not check for string matching in exception messages. This makes the test too brittle. We're already checking for other important fields in the WebSocket object.

Re-enable some UAP tests since the fixes are in master branch.

Closes dotnet/corefx#13302
Closes dotnet/corefx#22635
Closes dotnet/corefx#23204
Closes dotnet/corefx#28777
Closes dotnet/corefx#33401

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

5 years agoClean up HTTP/2 protocol exception handling (dotnet/corefx#37223)
Stephen Toub [Mon, 29 Apr 2019 17:51:29 +0000 (13:51 -0400)]
Clean up HTTP/2 protocol exception handling (dotnet/corefx#37223)

* Clean up HTTP/2 protocol exception handling

- Propagate the GOAWAY and RST_STREAM error codes to the calling code via an exception.
- Propagate to the Http2Stream exceptions incurred in the Http2Connection and that result in an Abort.
- Don't Dispose of the Http2Stream before we try to Cancel it.
- Make Http2ProtocolException serializable, as we generally do that for all of our exception types.
- Add tests that verify sufficient HTTP/2 protocol details are in the exception messages.
- Clean up the error message for the exception.
- Separate the error code and exception into their own files.
- Leave Http2ProtocolException internal for now; we can expose it publicly when we design the all-up public error model for HttpClient.

* Address PR feedback

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

5 years agoImprove a ClientWebSocket connection failure error message (dotnet/corefx#37267)
Stephen Toub [Mon, 29 Apr 2019 17:02:51 +0000 (13:02 -0400)]
Improve a ClientWebSocket connection failure error message (dotnet/corefx#37267)

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

5 years agofix noencryption tests on platforms with tls1.3 (dotnet/corefx#37213)
Tomas Weinfurt [Mon, 29 Apr 2019 16:41:33 +0000 (09:41 -0700)]
fix noencryption tests on platforms with tls1.3 (dotnet/corefx#37213)

* fix noencryption tests on platforms with tls1.3

* feedback from review

* fix platform detection

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

5 years agoRemove `Partial` from `EnablePartialNgenOptimization` (dotnet/corefx#36962)
Michal Strehovský [Mon, 29 Apr 2019 13:06:36 +0000 (15:06 +0200)]
Remove `Partial` from `EnablePartialNgenOptimization` (dotnet/corefx#36962)

Ngen optimizations are controlled with two properties - one is EnableNgen, the other is ApplyNgen. We were already using the ApplyNgen property with value of `full` (as of dotnet/corefx#36450), so this was already doing full Ngen, but we still used EnablePartialNgen to control the EnableNgen property. It's a roundabout way to EnableNgen, but does the same thing. This pull request removes the indirection.

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

5 years agoDon't allocate two strings in Activity.GenerateRootId (dotnet/corefx#37165)
Ben Adams [Mon, 29 Apr 2019 09:18:30 +0000 (10:18 +0100)]
Don't allocate two strings in Activity.GenerateRootId (dotnet/corefx#37165)

* Don't allocate two strings in Activity.GenerateRootId

* Packaging

* packaging

* Feedback

* feedback

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

5 years agoAdd proxy environment variables support for Windows (dotnet/corefx#37238)
David Shulman [Sun, 28 Apr 2019 00:06:35 +0000 (17:06 -0700)]
Add proxy environment variables support for Windows (dotnet/corefx#37238)

Changed the Windows version of SocketsHttpHandler so that it will honor the same environment
variables similar to the Linux and OSX versions. If the environment variables are not set
then it reverts back to the Windows WinInet/IE settings behavior.

I added several kinds of unit and end-to-end tests to verify the SystemProxyInfo class is
making the correct choice for all the different platforms regarding whether the
HttpEnvironmentProxy or platform proxy (HttpSystemProxy for Windows and MacProxy for OSX)
is used.

Fixes dotnet/corefx#37187

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

5 years agoGive SocketsHttpHandler more descriptive error messages (dotnet/corefx#37251)
Stephen Toub [Sat, 27 Apr 2019 23:22:33 +0000 (19:22 -0400)]
Give SocketsHttpHandler more descriptive error messages (dotnet/corefx#37251)

Currently lots of parsing failures just result in an exception stating "The server returned an invalid or unrecognized response."  We can instead be more descriptive about what the problem is in most cases.

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

5 years agoDisable sporadically failing HttpClientHandler test (dotnet/corefx#37253)
Stephen Toub [Sat, 27 Apr 2019 21:11:53 +0000 (17:11 -0400)]
Disable sporadically failing HttpClientHandler test (dotnet/corefx#37253)

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

5 years agoTweak a comment in HttpHandlerDefaults.cs
Stephen Toub [Sat, 27 Apr 2019 20:47:21 +0000 (16:47 -0400)]
Tweak a comment in HttpHandlerDefaults.cs

Fixes https://github.com/dotnet/corefx/issues/34966

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

5 years agoEnsure that invalid AIA, CDP, and OCSP extensions don't throw. (dotnet/corefx#37237)
Jeremy Barton [Sat, 27 Apr 2019 18:48:52 +0000 (11:48 -0700)]
Ensure that invalid AIA, CDP, and OCSP extensions don't throw. (dotnet/corefx#37237)

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

5 years agoAdd Ubuntu 19.04 RID (dotnet/corefx#37233)
Jeremy Barton [Sat, 27 Apr 2019 18:47:35 +0000 (11:47 -0700)]
Add Ubuntu 19.04 RID (dotnet/corefx#37233)

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

5 years agoFixing the logic in SystemNative_GetTimestampResolution to return the correct "ticks...
Tanner Gooding [Sat, 27 Apr 2019 01:05:18 +0000 (18:05 -0700)]
Fixing the logic in SystemNative_GetTimestampResolution to return the correct "ticks per second" (dotnet/corefx#37236)

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

5 years agoAdding System.Text.Json OOB package (dotnet/corefx#37129)
Jose Perez Rodriguez [Fri, 26 Apr 2019 23:49:25 +0000 (16:49 -0700)]
Adding System.Text.Json OOB package (dotnet/corefx#37129)

* Adding System.Text.Json OOB package

* Removing SourceRewriter dependency as it won't be used by the repo any longer

* Address PR Feedback

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

5 years agoDon't copy state unnecessarily (dotnet/corefx#37206)
BrennanConroy [Fri, 26 Apr 2019 23:24:42 +0000 (16:24 -0700)]
Don't copy state unnecessarily (dotnet/corefx#37206)

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

5 years agoImprove Utf8JsonWriter code coverage (dotnet/corefx#36811)
madmir [Fri, 26 Apr 2019 23:07:54 +0000 (01:07 +0200)]
Improve Utf8JsonWriter code coverage (dotnet/corefx#36811)

* Added test for expected argument exception when property name or value arguments reach MaxTokenSize

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

5 years agoFixes relative path at configSource on linux (dotnet/corefx#37146)
Jim Demis [Fri, 26 Apr 2019 22:33:31 +0000 (01:33 +0300)]
Fixes relative path at configSource on linux (dotnet/corefx#37146)

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

5 years agoPort Microsoft.VisualBasic.FileSystem (dotnet/corefx#37201)
Charles Stoner [Fri, 26 Apr 2019 22:14:16 +0000 (15:14 -0700)]
Port Microsoft.VisualBasic.FileSystem (dotnet/corefx#37201)

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

5 years agoReenable tests (dotnet/corefx#37081)
Steve MacLean [Fri, 26 Apr 2019 20:03:22 +0000 (16:03 -0400)]
Reenable tests (dotnet/corefx#37081)

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

5 years agoAdd serializer support for IDictionary non-primitive types (dotnet/corefx#37186)
Steve Harter [Fri, 26 Apr 2019 18:59:28 +0000 (11:59 -0700)]
Add serializer support for IDictionary non-primitive types (dotnet/corefx#37186)

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

5 years agodeal with empty response headers for HTTP2 (dotnet/corefx#37160)
Tomas Weinfurt [Fri, 26 Apr 2019 18:02:06 +0000 (11:02 -0700)]
deal with empty response headers for HTTP2 (dotnet/corefx#37160)

* deal with empty response headers for HTTP2

* fix test for http1.1

* feedback from review

* feedback from review

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

5 years agoupdate GatewayAddresses() to return IPv6 address on Unix (dotnet/corefx#37132)
Tomas Weinfurt [Fri, 26 Apr 2019 18:01:37 +0000 (11:01 -0700)]
update GatewayAddresses() to return IPv6 address on Unix (dotnet/corefx#37132)

* process IPv6 for GatewayAddresses

* fix GatewayAddresses for OSX and FreeBSD

* feedback from review

* feedback from review

* add updated ipv6_route for tests

* feedback from review

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

5 years agodeal with dualmode sockets (dotnet/corefx#37194)
Tomas Weinfurt [Fri, 26 Apr 2019 18:00:41 +0000 (11:00 -0700)]
deal with dualmode sockets (dotnet/corefx#37194)

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

5 years agoFix DateTime(Offset) formatting bugs in Utf8JsonWriter (dotnet/corefx#37159)
Layomi Akinrinade [Fri, 26 Apr 2019 17:57:36 +0000 (13:57 -0400)]
Fix DateTime(Offset) formatting bugs in Utf8JsonWriter (dotnet/corefx#37159)

* Fix DateTime(Offset) formatting bugs in Utf8JsonWriter

Fixes https://github.com/dotnet/corefx/issues/37147.

- The period token was being omitted for some inputs.
- Some offset tokens were being omitted for some inputs.

* Address review feedback

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

5 years agoAllow uppercase HTTP_PROXY and NO_PROXY variables (dotnet/corefx#37200)
David Shulman [Fri, 26 Apr 2019 13:23:55 +0000 (06:23 -0700)]
Allow uppercase HTTP_PROXY and NO_PROXY variables (dotnet/corefx#37200)

This is a redo of PR dotnet/corefx#35887.

Added support for uppercase HTTP_PROXY and NO_PROXY environment variables.
The uppercase versions are being used by Docker and other tools. This now
completes the set of environment variables that are already handling both
lower and upper case variants.

Note: This HttpEnvironmentProxy class is currently only used on Linux and OSX.
It is not used on Windows yet. I do plan to add support for this to Windows
at a later time, see dotnet/corefx#37187.

Added detection of CGI environments in order to suppress using the uppercase
HTTP_PROXY environment variable. See https://httpoxy.org/

Fixed some typos in the CSPROJ of the Http Unit Tests.

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

5 years agoAdd System.Resources.Extensions (dotnet/corefx#36906)
Eric StJohn [Fri, 26 Apr 2019 05:05:19 +0000 (22:05 -0700)]
Add System.Resources.Extensions (dotnet/corefx#36906)

* Add System.Resources.Binary.Reader|Writer

* Fix ResourceWriter tests

* Test fixes and PR feedback

* More test fixes

* Add packages for System.Resources.Binary.*

* Suppress duplicate types in System.Resources.Binary.*

* Test refactoring and adding RuntimeResourceSet

It turns out me must have our own ResourceSet since the CoreLib resource set doesn't
expose a constructor that takes an IResourceReader.

I've shared the code since it does a bit of non-trivial caching.

* Don't use auto-property initializers for platfrom sensitive test data

For some reason I thought these lazy-initialized the properties but they don't.

As a result we were hitting the platform sensitive code even when we never
called the getter.  Switch to an expression instead.

* Only use Drawing converters on Windows

* Fix test failures

* Don't leak System.Private.CoreLib into resources

* Make sure RuntimeResourceSet doesn't call ResourceReader(IResourceReader)

* WIP

* Rename types in System.Resources.Extensions

Leave RuntimeResourceSet internal as it doesn't need to be public.

* Update packages

* Respond to API review feedback

Remove abstraction for ResourceReader/Writer: just reuse the source.

Remove non-essential members.

* Clean up

* Further cleanup

* Further cleanup

* Review feedback

* Ensure we have stable type names in Resources.Extensions

We don't want to use the runtime type identity when doing type checks or writing
types as this may change.  Instead, check-in hard-coded strings that match the
type identity.

Add a test case to ensure the resources we generate match what we
test the reader against in the resource manager case (also to track any
change to the binary format).

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

5 years agoPick up last build runtime.native.System.IO.Ports during testing (dotnet/corefx#37195)
Eric StJohn [Thu, 25 Apr 2019 22:09:50 +0000 (15:09 -0700)]
Pick up last build runtime.native.System.IO.Ports during testing (dotnet/corefx#37195)

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

5 years agoimproving error message for non-windows platform (dotnet/corefx#37193)
Anirudh Agnihotry [Thu, 25 Apr 2019 19:54:10 +0000 (12:54 -0700)]
improving error message for non-windows platform (dotnet/corefx#37193)

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