Commit Graph

36651 Commits

Author SHA1 Message Date
BrennanConroy 74dbb4ff4f
Register callback before start (#4581) 2018-12-13 21:30:48 -08:00
BrennanConroy 4950495dc4
Fix IE 11 handshake split (#4575) 2018-12-13 21:30:17 -08:00
Ajay Bhargav Baaskaran 59ada30959 Merge branch 'ajbaaska/merge-22-to-master' 2018-12-13 17:34:41 -08:00
Mikael Mengistu 42afc62acf
Update src/Middleware/CORS/test/FunctionalTests/CorsMiddlewareFunctionalTest.cs
Co-Authored-By: ajaybhargavb <ajaybhargavb@gmail.com>
2018-12-13 16:51:00 -08:00
Nate McMaster 538af1091c
Update src/Middleware/CORS/test/FunctionalTests/CorsMiddlewareFunctionalTest.cs
Co-Authored-By: ajaybhargavb <ajaybhargavb@gmail.com>
2018-12-13 16:39:37 -08:00
Nate McMaster 6e3e48d456
Update src/Middleware/CORS/test/FunctionalTests/CorsMiddlewareFunctionalTest.cs
Co-Authored-By: ajaybhargavb <ajaybhargavb@gmail.com>
2018-12-13 16:39:27 -08:00
Ben Adams b2731d652d .IndexOf(...) >= 0 to .Contains(...) (#4688) 2018-12-14 12:40:09 +13:00
Nate McMaster 96ea326664
Document custom reference resolution (#4806) 2018-12-13 14:35:02 -08:00
Cédric Luthi 4a9a96cef7 Make the ResultStatusCodes property null-resettable 2018-12-13 14:09:21 -08:00
Cédric Luthi 74d900ea56 Add setter to HealthCheckOptions.ResultStatusCodes
All other properties (`Predicate`, `ResponseWriter` and `AllowCachingResponses`) have a setter but `ResultStatusCodes` doesn't.

Without a setter, reusing the same status to http status code mapping is impossible and leads to duplicate code that looks like this:

```csharp
private static void ConfigureHealthChecks(IApplicationBuilder app, HealthCheckServiceOptions options)
{
    app.UseHealthChecks("/health", new HealthCheckOptions
    {
        ResultStatusCodes =
        {
            [HealthStatus.Healthy] = StatusCodes.Status200OK,
            [HealthStatus.Degraded] = StatusCodes.Status400BadRequest,
            [HealthStatus.Unhealthy] = StatusCodes.Status503ServiceUnavailable
        }
    });
    foreach (var name in options.Registrations.Select(e => e.Name))
    {
        app.UseHealthChecks($"/health/{name}", new HealthCheckOptions
        {
            Predicate = registration => registration.Name == name,
            ResultStatusCodes =
            {
                [HealthStatus.Healthy] = StatusCodes.Status200OK,
                [HealthStatus.Degraded] = StatusCodes.Status400BadRequest,
                [HealthStatus.Unhealthy] = StatusCodes.Status503ServiceUnavailable
            }
        });
    }
}
```

With a setter, this code could be rewritten in a *don't repeat yourself* (DRY) way:

```csharp
private static void ConfigureHealthChecks(IApplicationBuilder app, HealthCheckServiceOptions options)
{
    var resultStatusCodes = new Dictionary<HealthStatus, int>
    {
        [HealthStatus.Healthy] = StatusCodes.Status200OK,
        [HealthStatus.Degraded] = StatusCodes.Status400BadRequest,
        [HealthStatus.Unhealthy] = StatusCodes.Status503ServiceUnavailable
    };
    app.UseHealthChecks("/health", new HealthCheckOptions
    {
        ResultStatusCodes = resultStatusCodes
    });
    foreach (var name in options.Registrations.Select(e => e.Name))
    {
        app.UseHealthChecks($"/health/{name}", new HealthCheckOptions
        {
            Predicate = registration => registration.Name == name,
            ResultStatusCodes = resultStatusCodes
        });
    }
}
```
2018-12-13 14:09:21 -08:00
James Newton-King 35d8ee6cdf
Require nodejs 10 and update build docs (#4805) 2018-12-14 10:58:03 +13:00
Ajay Bhargav Baaskaran 0ecc6bc0b5 Merge branch 'release/2.2' into ajbaaska/merge-22-to-master 2018-12-13 12:06:48 -08:00
John Luo a026e7a4e7
Convert MetaPackages to Reference and move to DefauldBuilder folder (#4687)
* Convert ServerTests to Reference and move to Server folder

* Fix NU1105
2018-12-13 11:39:15 -08:00
John Luo 6d2f2483d2
Remove obsolete session apis (#4609)
* Remove obsolete session apis

* Add breaking changes json updates
2018-12-12 17:35:40 -08:00
Chris Ross a3c99028b2
Fix HttpSys Caching_SendFileWithFullContentLength_Cached test (#4630) 2018-12-12 17:14:46 -08:00
Mikael Mengistu 9e76bec6e1
Fix CORS Functional Tests (#4610) 2018-12-12 14:36:14 -08:00
Justin Kotalik 429719b91d
Make IISIntegration use Reference instead of PackageReference (and reactionary work) (#4311) 2018-12-12 16:59:44 -05:00
Chris Ross 49d5525352
Change Hosting projects to target netcoreapp3.0 #3754 (#4611) 2018-12-12 13:34:57 -08:00
James Newton-King ac1b5c58b0
Fix NU1105 errors in HttpAbstractions.sln (#4608) 2018-12-13 10:15:01 +13:00
Ajay Bhargav Baaskaran 5e6c2208fd Merge branch 'release/2.1' into release/2.2 2018-12-12 13:14:20 -08:00
Ajay Bhargav Baaskaran ad3835c3e2
Removed unnecessary projects (#4586) (#4612) 2018-12-12 12:59:04 -08:00
Justin Kotalik 74753428e9
Add Vs install script (#4607) 2018-12-12 15:57:00 -05:00
Chris Ross a08f4b5a83
ResponseCompression DisposeAsync BasicMiddleware/#247 (#4604) 2018-12-12 11:32:36 -08:00
Ajay Bhargav Baaskaran 98f2973880
Removed unnecessary projects (#4586) 2018-12-12 10:41:06 -08:00
Justin Kotalik 226f2c0c2c
Adds MinimumReadThreshold to StreamPipeReader. (#4372) 2018-12-12 13:09:15 -05:00
Chris Ross 12966c63a6
Change DataProtection projects to target netcoreapp3.0 #3754 (#4473) 2018-12-12 10:04:36 -08:00
Chris Ross 6d442c1e3d
Upgrade Kestrel to target netcoreapp3.0 #3754 (#4405) 2018-12-12 08:16:00 -08:00
Nate McMaster 87629bbad9
Update Middleware.sln and Kestrel.sln to workaround NU1105 error 2018-12-11 18:19:36 -08:00
Nate McMaster d12827e609
Merge branch 'release/2.2' 2018-12-11 18:04:58 -08:00
Kahbazi 19276ce01c Remove nameof from log events 2018-12-12 07:19:32 +05:30
Nate McMaster d53b5569ae
Merge branch 'release/2.1' into release/2.2 2018-12-11 17:47:37 -08:00
Mikael Mengistu ff385f71c5
Check connectionState in stop so we don't null ref (#4557) 2018-12-11 16:22:06 -08:00
dotnet-maestro-bot 38785d0be9 [automated] Merge branch 'release/2.1' => 'release/2.2' (#4577)
* Workaround problems when opening solution files in Visual Studio (#4569)

Changes:

* Condense Routing.sln into HttpAbstractions.sln
* Workaround NU1105 by adding all ProjectReferences to the .sln
* Workaround exceptions in the ReferencesHostBridge by moving Reference items to a temporary item group
* Add a 'startvs.cmd' script for launching VS with the right env variables
* Remove RangeHelper test project
* Move RangeHelper tests into StaticFiles.Tests and add target for NPM restore

* Convert Session to use Reference and move to Middleware folder (#4576)

* Add RoutingSample.Web to HttpAbstractions.sln
2018-12-11 16:13:20 -08:00
seancpeters 21488b2b04 Add a workaround for a bug in `dotnet tool install` and the scaffolding command line tool (#4580) 2018-12-11 15:53:10 -08:00
Chris Ross 97cdbfb1a1
Change middleware projects to target netcoreapp3.0 #3754 (#4472) 2018-12-11 15:41:36 -08:00
Nate McMaster 719ff08409
Add RoutingSample.Web to HttpAbstractions.sln 2018-12-11 14:58:05 -08:00
John Luo 3acdfb3d26
Convert Session to use Reference and move to Middleware folder (#4576) 2018-12-11 14:56:42 -08:00
Nate McMaster 5151e7b1ed
Workaround problems when opening solution files in Visual Studio (#4569)
Changes:

* Condense Routing.sln into HttpAbstractions.sln
* Workaround NU1105 by adding all ProjectReferences to the .sln
* Workaround exceptions in the ReferencesHostBridge by moving Reference items to a temporary item group
* Add a 'startvs.cmd' script for launching VS with the right env variables
* Remove RangeHelper test project
* Move RangeHelper tests into StaticFiles.Tests and add target for NPM restore
2018-12-11 14:05:21 -08:00
Chris Ross 7fdd930f50
Change IIS projects to target netcoreapp3.0 (#4371)
* Change IIS projects to target netcoreapp3.0 #3754
2018-12-11 13:46:46 -08:00
Pavel Krymets 7f1f7a5256
Change runtime site extension to ship by default (#4572) 2018-12-11 10:48:55 -08:00
Chris Ross 99901fbad5
Move Identity.Core and Identity.Stores to NetCoreApp3.0 #3754 (#4523) 2018-12-11 10:23:01 -08:00
Steve Sanderson 24840e3465
Razor Components template (#4333) 2018-12-11 11:40:42 +00:00
James Newton-King 0c9eda1f4a
Update templates to use endpoint routing (#4500) 2018-12-11 18:24:14 +13:00
James Newton-King c6fa808a91
Change consumes behavior to ignore requests with no content type (#4459) 2018-12-11 17:55:20 +13:00
Nate McMaster dc718f6602
Merge branch 'merge/release/2.2-to-master' 2018-12-10 18:18:52 -08:00
Nate McMaster 790ae47055
Merge branch 'release/2.2' 2018-12-10 17:41:14 -08:00
John Luo 97d918e03a
Do 0-byte reads on MacOS (#4560)
Underlying corefx issue has been fixed
2018-12-10 17:25:18 -08:00
Ryan Nowak 61d33bed27 Fix failing routing tests 2018-12-10 17:17:58 -08:00
Nate McMaster 2c4d586809
Merge 'release/2.1' into release/2.2
Co-authored-by: Justin Kotalik <jukotali@microsoft.com>
2018-12-10 15:56:42 -08:00
Nate McMaster 1fd3fb764a
Update the list of shipping vs internal packages (#4552)
* Put packages back into 'ship' which were unintentionally skipped in 3.0 refactoring
   * Libuv transport for kestrel
   * Http connection abstractions shared by SignalR client and Kestrel.
   * Microsoft.AspNetCore.SignalR.Protocols.NewtonsoftJson - this wasn't moved to the right category when it was added
* Make dotnet-* packages internal-only. They were only shipped to NuGet.org because we had not yet enabled source-build. We plan to implement source-build in 3.0 (#3752)
* Make Microsoft.Extensions.Identity.* packages shared-framework only (see #4523). 
* Remove unused entries for packages that moved to aspnet/AspNetCore-Tooling
* Add comments in the artifacts.props document for why each 'noship' package is in this category.
2018-12-10 15:37:54 -08:00