Commit Graph
1107 Commits
Author SHA1 Message Date
Stephen Toub 00311b4617 Add support for UseDefaultCredentials to CurlHandler
Rely on libcurl internally using gssapi and kerberos infrastructure.


Commit migrated from https://github.com/dotnet/corefx/commit/8499dc22409f59db6b83ad8a4da9cfac9357b6f9
2017-04-19 14:11:20 -04:00
Eric St. John 08a06887a3 Re-enable package validation and clean up package content
Commit migrated from https://github.com/dotnet/corefx/commit/72002dbb7e3e657adaeb002feca0399d9667a54b
2017-04-18 13:28:50 -07:00
Eric St. John d47f03fb56 Explicitly list paths for harvesting
Commit migrated from https://github.com/dotnet/corefx/commit/ec4d6f868eb6497216791fc158173e7123d6e73f
2017-04-18 12:20:30 -07:00
Daniel Harvey 252cdc5e95 Bulk updates of tests for AssertExtensions (dotnet/corefx#18491)
Bulk update to AssertExtensions.Throws for AOT support. This doesn't disable Assert.Throws.

Commit migrated from https://github.com/dotnet/corefx/commit/b43b4df2e0e2182154bb0f425cb4a61bc1269828
2017-04-18 09:52:02 -07:00
danmosemsft 356e660bfd Increase timeout
Commit migrated from https://github.com/dotnet/corefx/commit/790f633dc071d4ac8486700cd9c2a3f4f5c36c01
2017-04-17 16:43:50 -07:00
Viktor Hofer ebb1c635a9 Removed ActiveIssue comment in favor of explanation why this behavior is intended on Windows
Commit migrated from https://github.com/dotnet/corefx/commit/8fd9800cab67fe7eac59be441eadaec048234ed1
2017-04-15 13:49:27 +02:00
Eric St. John 30b972e1b2 Add NETStandard.Library.NETFramework package
This package is a support package for NETStandard2.0 on .NET 4.6.1.


Commit migrated from https://github.com/dotnet/corefx/commit/796a4b6af55c9ff548e172a943b9af737706fe2b
2017-04-12 13:42:52 -07:00
Stephen Toub ac687fe50f Fix length calculation in HttpContent to avoid unnecessary growth
Commit migrated from https://github.com/dotnet/corefx/commit/100f112b98968cb14587fe910089ecd28c48e5e4
2017-04-12 08:01:35 -04:00
Wes Haggard dacaabc206 Merge pull request dotnet/corefx#18165 from weshaggard/UpdateAssemblyKeys
Updates how we define which key an assembly uses

Commit migrated from https://github.com/dotnet/corefx/commit/4b0b313c3a40fefe793ab465f152f382484813d8
2017-04-10 16:48:43 -07:00
Eric Mellino ddb473aac9 Move corefx onto the .NET Core 2.0 toolset
Commit migrated from https://github.com/dotnet/corefx/commit/8b471f76eef041f0cf40fec65c99a29b235bbe7d
2017-04-10 14:36:01 -07:00
Wes Haggard 4185183e8c Updates how we define which key an assembly uses
Now instead of Use*Key a project can instead define the assembly key
in the project (genreally the common dir.pops for a project) using
the AssemblyKey property. The accepted values are Open, ECMA, MSFT,
Test.

This change allows for a repo to set the default key they want to use
for projects. In corefx we have switched the default to use the Open
key instead of the old BuildTools default of MSFT key.

As part of this update we are explicitly setting the AssemblyKey in
all the library projects (although it is really only necessary for
projects that aren't the default).

Also with this change we are updating all the new libraries that have
not yet shipped stable (compared to our 1.1 release) and making them
use the Open key. Which means that for prerelease dependencies there
might be some binary breaking changes to consume.

The following libraries ahven't shipped so there key is being
changed from MSFT to Open:
Microsoft.XmlSerializer.Generator
System.CodeDom
System.Configuration.ConfigurationManager
System.Data.Odbc
System.DirectoryServices
System.DirectoryServices.AccountManagement
System.DirectoryServices.Protocols
System.IO.Ports
System.Json
System.Memory
System.Net.HttpListener
System.Net.Mail
System.Net.ServicePoint
System.Net.WebClient
System.Net.WebProxy
System.Private.Xml
System.Private.Xml.Linq
System.Security.Cryptography.Xml
System.Security.Permissions
System.Transactions.Local
System.Web.HttpUtility


Commit migrated from https://github.com/dotnet/corefx/commit/ac09a797d09502ebab61f7167bb856846602e1e6
2017-04-10 12:51:50 -07:00
Tijoy Tom Kalathiparambil 324755f6fd More PNSE disabling for UWP
I have disabled couple of PNSE
which look suspect and opened
issue to review all PNSE. Doing it
one by one is not scalable since app
runs take about 10 hours to complete.


Commit migrated from https://github.com/dotnet/corefx/commit/0ca241a01e4d2219220dcb194dc404d90a20ab65
2017-04-08 12:19:43 -07:00
Tijoy Tom Kalathiparambil b61e483e0e Couple of fixes for UWP app-compat.
1. HttpClientHandler.PreAuthenticate throws PNSE, disabling
   it for now.
2.System.Runtime.CompilerServices.RuntimeOps need to be
  reflection enabled.


Commit migrated from https://github.com/dotnet/corefx/commit/c9c5217085f0f591d6a7659aeccecd7c71b9f2ad
2017-04-07 21:27:38 -07:00
Stephen Toub ff38f977e8 Merge pull request dotnet/corefx#18008 from stephentoub/fix_nullref_httpdispose
Fix race condition in HttpClient on Unix when canceling a request

Commit migrated from https://github.com/dotnet/corefx/commit/02e79f08fe0fba8bc31ba4860c0edc0cdb2707ee
2017-04-06 21:16:43 -04:00
Tijoy Tom Kalathiparambil c20b5097eb Disable HttpRequest.MaxResponseHeadersLength PNSE.
This is necessary for app-compat , apps fails
because of PNSE exception.This is a workdaround
till we get the correct fix, seedotnet/corefx#18036


Commit migrated from https://github.com/dotnet/corefx/commit/902799c56feef43e2533b5b4f27e9e278c227ce4
2017-04-06 16:07:49 -07:00
Stephen Toub eb0263f18f Store _pendingReadRequest into a local for multiple accesses
It should not be possible by construction for _pendingReadRequest to become null in SignalComplete after we check it for nullness, as all access to it is protected by a lock.  But for good measure, store it into a local and use that local for subsequent accesses.  If nothing else, we can avoid an extra field access.


Commit migrated from https://github.com/dotnet/corefx/commit/7dc759724bd3da68ebe3756f1e3ffa9bd9266d2c
2017-04-06 10:29:14 -04:00
Stephen Toub 580e439dc7 Associate EasyRequest with MultiAgent in ctor
It looks like it's possible in a rare situation for the following to occur and result in a NullReferenceException when finalizing a request:
- HttpClient.SendAsync is called, which creates an EasyRequest.  That EasyRequest isn't yet associated with a MultiAgent.
- The request is queued to the MultiAgent.
- Between the time that the request is queued and it's handled, the associated CancellationToken has cancellation requested.
- When the agent then processes the request, in ActivateNewRequest it'll see that cancellation has been requested and will immediately bail, before associating the easy request with the agent.
- Everything is dropped and eventually finalized.  At that point the response stream's finalizer is invoked, it calls SignalComplete(..., forceCancel:true), and that dereferences _associatedMultiAgent in order to issue a cancellation request... but _associatedMultiAgent hasn't yet been set.

There's no reason _associatedMultiAgent's initialization needs to be deferred until the EasyRequest is picked up by the agent.  We can instead make _associatedMultiAgent a readonly field that's initialized to the associated agent when the EasyRequest is constructed, so it won't be null even in such a situation.


Commit migrated from https://github.com/dotnet/corefx/commit/534a8dcd35bd3f264d08eadfe54a49e859e2012e
2017-04-06 10:21:50 -04:00
Stephen Toub aff50fd9a3 Merge pull request dotnet/corefx#17951 from marek-safar/http
Fixes NRE when setting Size property of ContentDispositionHeaderValue

Commit migrated from https://github.com/dotnet/corefx/commit/dff31f7522b6af42344da6f6a78db7ed1cf830da
2017-04-05 13:58:30 -04:00
Eric StJohn 0a2460e891 Merge pull request dotnet/corefx#17825 from ericstj/ILLinkTrimAssembly
Add ILLink to the build

Commit migrated from https://github.com/dotnet/corefx/commit/16625287b450bc623fe46683f0ff27da1ab5ad47
2017-04-05 10:19:17 -07:00
Marek Safar df19e1fb58 Fixes NRE when setting Size property of ContentDispositionHeaderValue
Commit migrated from https://github.com/dotnet/corefx/commit/d6a3dbe4addaae897b9d82aedb3afeb125740f29
2017-04-05 18:56:39 +02:00
David Shulman fb0d9456d4 Adjust tests to check for proper Windows 10 update version
Remove unneeded old Windows 10 version check (IsWindows10VersionInsiderPreviewOrGreater).
Use the official Windows 10 Creators Update version number 1703 (build 15393) which is
already defined (IsWindows10Version1703OrGreater).

Fixes dotnet/corefx#8945, dotnet/corefx#10958


Commit migrated from https://github.com/dotnet/corefx/commit/d56c8d1185fdea71e0c210d8ab3d111a40dc3047
2017-04-04 13:04:59 -07:00
David Shulman 83ac5b6403 Fix MaxResponseHeadersLengthSemantics (dotnet/corefx#17796)
* Fix MaxResponseHeadersLengthSemantics

The new HttpClientHandler.MaxResponseHeadersLength property is defined differently from the similarly
named WebRequestHandler and HttpWebRequest properties. The units are supposed to be in Kilobytes
(1024 bytes). This problem was discovered while doing .NET Core vs. .NET Framework compat testing.

Fix the semantics to match the existing WebRequestHandler and HttpWebRequest properties. Adjust tests.

Contributes to dotnet/corefx#17691

* Address PR feedback


Commit migrated from https://github.com/dotnet/corefx/commit/170f7a5ac7f98f2076f0776c573e3188a390d565
2017-04-03 14:25:25 -07:00
Tijoy Tom Kalathiparambil a9298e6c91 Temporary fix for dotnet/corefx#17812
This's a temporary fix for issue
https://github.com/dotnet/corefx/issues/17812
to get us unblocked for ns2.0 UWP app-compact.


Commit migrated from https://github.com/dotnet/corefx/commit/0945e962ba34f8c3db854eef067ca5b082749781
2017-04-03 10:39:00 -07:00
Eric St. John 1a839a01f5 Add manual roots for ILLink
These represent dynamic dependencies that are not caught by ILLink.

See individual files for details on the dependencies.


Commit migrated from https://github.com/dotnet/corefx/commit/2277db969616a5ad4fd9f4a8118a3b4030ff62d3
2017-04-03 10:23:59 -07:00
David Shulman 75d4e8ad18 Fixes for running Http tests against Desktop
Got the Http Functional tests running with no errors against NETFX (Desktop). Found a bunch
of compatibility differences between Desktop and Core that need to be investigated. For now,
the tests are skipped on Desktop.

Fixed the LoopbackServer so that it will run. It was blowing up with `MissingTypeException`
due to missing SocketTaskExtensions class (dotnet/corefx#17690).

Contributes to dotnet/corefx#17691


Commit migrated from https://github.com/dotnet/corefx/commit/b7f6f5f159ebe6c0597578bbd858697a6159a22f
2017-04-01 09:28:32 -07:00
David Shulman 5fd3a239ce Modify HttpClientHandler compression default to match Desktop
Change HttpClientHandler property for AutomaticDecompression to match
original .NET Framework default. Adjust tests accordingly.

Contributes to dotnet/corefx#17691


Commit migrated from https://github.com/dotnet/corefx/commit/eb21a724bff127d3ab0c34240234ef93ac1a94fb
2017-03-30 13:36:49 -07:00
Santiago Fernandez Madero 4f7e250ed1 Disable test (dotnet/corefx#17692)
Commit migrated from https://github.com/dotnet/corefx/commit/755f816d20536dbf87c80baa411a6da00bf94203
2017-03-30 10:44:00 -07:00
Santiago Fernandez Madero 0129621923 Disable some outerloop tests (dotnet/corefx#17623)
Commit migrated from https://github.com/dotnet/corefx/commit/ed04496053a37fedd0a4ebe2022deec1031e1066
2017-03-28 15:53:46 -07:00
Santiago Fernandez Madero de36b4d76e Update csproj and solutions configurations (dotnet/corefx#17613)
* Update csproj and solutions configurations


Commit migrated from https://github.com/dotnet/corefx/commit/9fa0bc5de96946eb3e109f13768f1258cfaddc73
2017-03-28 14:36:26 -07:00
Dan Moseley c6090a8624 Log elapsed
Commit migrated from https://github.com/dotnet/corefx/commit/5a0fb9465e4dc68fb1a7f1924c9df43440d80472
2017-03-27 21:57:46 -07:00
Stephen Toub 55eb9731e1 Expose and use static ExceptionDispatchInfo.Throw (dotnet/corefx#17570)
Commit migrated from https://github.com/dotnet/corefx/commit/a44c93063d24e29971891bfc2cf8b0aa8771eae9
2017-03-27 21:45:34 -07:00
Stephen Toub 540e6f1671 Merge pull request dotnet/corefx#17560 from stephentoub/curl_trailer
Add test for HttpClient handling of trailer headers

Commit migrated from https://github.com/dotnet/corefx/commit/8a66064b3317286a61cefc4e81574f268e9d2950
2017-03-27 18:40:31 -04:00
David Shulman 67cf9310ba Fix Http Unit tests for NETFX build
Change the CSPROJ so that Http Unit tests now build and run
successfully.

i.e.:

>Msbuild /t:rebuildandtest /p:TargetGroup=netfx

now works in the src/System.Net.Http/tests/UnitTests folder


Commit migrated from https://github.com/dotnet/corefx/commit/06e9ab3021a00e8fe092a0abd6476296fcd12989
2017-03-27 13:08:08 -07:00
Stephen Toub 6445d60d14 Add test for HttpClient handling of trailer headers
Commit migrated from https://github.com/dotnet/corefx/commit/fede47996025201929aedd25b815a30b1a348a47
2017-03-27 14:03:49 -04:00
David Shulman cb3f31107b Fix Http test regarding uri fragments and redirection
No real test code change. But confirming that this test needs to be
skipped on Windows 7 due to a bug in WinHTTP with preserving fragments
in an uri during redirection. The WinHTTP bug was fixed in Windows 8.

Fixes dotnet/corefx#16133.


Commit migrated from https://github.com/dotnet/corefx/commit/7e1e66eb04075cbd69469c7498c4b04bd5db396b
2017-03-21 08:05:02 -07:00
Vance Morrison 0e90c456bf Renames the HTTP outgoing request Activity to HttpReqOut (dotnet/corefx#17296)
* Renames the HTTP outgoing request Activity to HttpReqOut

It was named simply 'Activity' which is too generic.

* Rename Activity to HttpRequestOut


Commit migrated from https://github.com/dotnet/corefx/commit/1c1cdddac83c7457bad037483fdb5dc4820610f7
2017-03-20 15:01:28 -04:00
Eric StJohn 00911947ed Merge pull request dotnet/corefx#17261 from ericstj/fixHttpRef
Include desktop ref for System.Net.Http

Commit migrated from https://github.com/dotnet/corefx/commit/221f8331a8cf3d23e6cf4da87359a0caa9bc4812
2017-03-20 09:21:08 -07:00
Eric St. John cc3f9f775e Include desktop ref for System.Net.Http
In most cases we don't include the desktop refs because those
configurations are merely present to pass to API Compat.

In the System.Net.Http case the ref is actually necessary since the
ref is a real ref and not a facade.


Commit migrated from https://github.com/dotnet/corefx/commit/1c7f7034af89a59609711e09b2922889bcce492d
2017-03-17 16:23:35 -07:00
Jose Perez Rodriguez 85d2f4d15f Defining uapaot constant on System.Private.Xml to fix XmlSerializer on uapaot (dotnet/corefx#17244)
Defining uapaot constant on System.Private.Xml to fix XmlSerializer on uapaot

Commit migrated from https://github.com/dotnet/corefx/commit/5d20e4df940dc9991af5cbb3f5ecc824e3151741
2017-03-17 12:54:27 -07:00
Caesar Chen b6892a28ed change the test label and add string to the resource file of WinHttpHandler to correct build error
Commit migrated from https://github.com/dotnet/corefx/commit/f57d3f2b4ee02c1e7cdc0a7d649eeda7d7a680d4
2017-03-16 14:48:58 -07:00
Caesar Chen eb24955a77 fix the HttpClientHandler.ClientCertificates behaviour when ClientCertificateOption.Automatic is set
Commit migrated from https://github.com/dotnet/corefx/commit/72322773ec42b011622e8162acfdff4ecc3beb0c
2017-03-16 13:21:12 -07:00
Jeremy Barton 6de1ce2c7b Merge pull request dotnet/corefx#17011 from dotnet/dev/apple_crypto
Remove OpenSSL dependency on macOS (dev/apple_crypto -> master)

Commit migrated from https://github.com/dotnet/corefx/commit/50218eaa16dbe5812752919f2e195893cedea507
2017-03-13 20:43:31 -07:00
Lakshmi Priya Sekar 2294799bc3 Re-enable disabled tests for CI.
Commit migrated from https://github.com/dotnet/corefx/commit/6522e059ed166d3e4802e85c459b1c666cbe87b9
2017-03-13 14:09:20 -07:00
Jeremy Barton d31151b74c Merge remote-tracking branch 'dotnet/master' into master_to_apple_crypto
Conflicts:
	src/System.Net.Security/src/System/Net/CertificateValidationPal.Unix.cs


Commit migrated from https://github.com/dotnet/corefx/commit/5382ff2d042e273aa6b76dc7d48277aa0b23145b
2017-03-13 10:25:42 -07:00
Liudmila Molkova 7bbbd74bb7 up
Commit migrated from https://github.com/dotnet/corefx/commit/8512ffd1b91f3a97faf6b588303c03bb8d09b9c0
2017-03-11 01:31:53 -08:00
Liudmila Molkova 259df6f4db Send request in System.Net.Http.Activity.Stop payload
Commit migrated from https://github.com/dotnet/corefx/commit/1b50b645ff201ee85b55095cf45ae5e1290a29fa
2017-03-11 01:13:39 -08:00
Jeremy Barton b978bc6f2c Merge remote-tracking branch 'dotnet/master' into master_to_applecrypto
Conflicts:
	netci.groovy
	src/System.Net.Security/src/System/Net/Security/SecureChannel.cs
	src/System.Security.Cryptography.X509Certificates/src/Internal/Cryptography/Pal.Unix/OpenSslX509Encoder.cs
	src/System.Security.Cryptography.X509Certificates/src/Resources/Strings.resx
	src/System.Security.Cryptography.X509Certificates/tests/Cert.cs
	src/System.Security.Cryptography.X509Certificates/tests/CollectionImportTests.cs
	src/System.Security.Cryptography.X509Certificates/tests/CollectionTests.cs
	src/System.Security.Cryptography.X509Certificates/tests/PfxTests.cs
	src/System.Security.Cryptography.X509Certificates/tests/X509StoreTests.cs


Commit migrated from https://github.com/dotnet/corefx/commit/5d7aec3e00afd35d0211b50c0630a1614a548726
2017-03-10 17:44:40 -08:00
Dan Moseley 9d47195e42 Enable Pinvoke checker and baseline violations (dotnet/corefx#16704)
* Fix UWP Pinvoke checker condition

* analyzer baselines

* Remove redundant local define

* Remove redundant CA lines

* Special case Registry

* Fix BlockReflectionAttribute

* Replace NETNATIVE with uap define

* baselines

* Disable Pinvoke scan on specific projects

* Disable BlockReflectionAttribute on ilproj

* Revive 2 baselines

* Disable UWP validation on SQlClient

* Convert some defines to `uwp`

* Fix S.N.Primitives baseline

* Remove dead baselines

* Clean up NET_NATIVE defines

* Remove FEATURE_CORECLR except from shared sources

* Change Threading.Thread defines to just uapaot

* Fix comment

* Fix comment 2

* Change serialization uap defines to uapaot

* Rename EnableWinRT to UWPCompatible

* Fix UAP build for Console

* Fix uap condition in XML csproj

* Fix condition in XmlSerializer project

* Replace netcore50

* Remove dead #if

* Redundant console condition

* Redundant console condition2

* Trim baseline

* Revert Console baseline to pre UAP

* Fix MemoryMappedFiles uap build

* Fix S.Linq.Expressions build for UAP by temporarily disabling it

* Fix S.N.Sockets build for uap

* No plans to put SQLClient in UWP

* Fix RuntimeInformation build

* Fix MemoryMappedFiles build for Unix

* Add UWPCompatible to all netstandard versions

* Add EnablePinvokeAnalyzer to disable Pinvoke checking entirely for some reason

* Remove dead System.Xml.XmlSerializer.Tests.settings.targets

* Fix interop services build

* Remove last uap/uapaot define in Xml tests

* PInvoke check doc

* Fix PInvoke casing

* PInvoke file is case sensitive

* Remove unnecessary references to uapaot from projects that don't have uapaot configs

* Remove unnecessary uapaot from S.R.I.RI

* Replace UWPCompatible for TargetGroup in csproj conditions

* Reverse FileSystem edit as not ready to build for UWP


Commit migrated from https://github.com/dotnet/corefx/commit/b1865ea0847a7a86baefe8378b772ecf0b785681
2017-03-09 21:08:39 -08:00
Stephen Toub 07c43704a1 Remove dead and useless code
- Removed stale code not used anywhere
- Removed defunct replacement code from .NET Core 1.x that can now use the real methods in .NET Core 2.0 (e.g. DnsAPMExtensions)
- Removed stale compilation constants
- Removed Unix-specific MultipleSocketMultipleConnectAsync that's no longer necessary as we're able to reuse Sockets after failed connects
- Moved some Unix-specific code out of the Windows compilation
- Modified some perf-counter code to minimize its impact, since it's currently a nop
- Replaced the same repeated snippet of error handling code with a helper
- Removed unused namespace imports
- Removed some unnecessary null checks, for objects that can never be null based on always being assigned to new objects in the ctors
- Removed unnecessary tracing guards, where a guard was just used at all call sites
- Removed invalid asserts that were triggered by new tests
- Some other minor miscellaneous cleanup as I noticed things, like using the null-coalescing operator


Commit migrated from https://github.com/dotnet/corefx/commit/e7b687700aefa791a05ac0f7024cedd514c2dc36
2017-03-05 20:16:57 -05:00
Vance Morrison 68ac0b803f Merge pull request dotnet/corefx#16393 from lmolkova/dev/http_client_activity_part2
Http request instrumentation with Activity (correlation part2)

Commit migrated from https://github.com/dotnet/corefx/commit/896d79030ccf928b97d7e9faef230936db5f53d4
2017-03-03 13:06:37 -08:00