Commit Graph

254 Commits

Author SHA1 Message Date
Chris Ross 080660967b
Unified response body features (#12328) 2019-07-25 16:27:08 -07:00
N. Taylor Mullen c54a7209d7 Clear route values after middleware invocation.
#11233
2019-07-24 14:12:06 -07:00
N. Taylor Mullen 479d5ed40a Addressed code review comments. 2019-07-24 14:12:06 -07:00
N. Taylor Mullen 9a6881b0e8 Fix endpoint routing statefulness.
- In the case that other middleware change the path of an `HttpContext` and cause middleware to re-invoke we used to short-circuit on second time through the middleware pipeline, now we allow routing to occur.
- Added unit tests to validate the clearing of state.

#11233
2019-07-24 14:12:06 -07:00
Andrew Stanton-Nurse 48b44dbb92
Add clarifying comment to HttpMethods.cs (#12441)
To help prevent well-meaning (but not actually desirable) changes like https://github.com/aspnet/AspNetCore/pull/12439
2019-07-23 08:09:16 -07:00
Ben Adams 65ca72c420 Better context pooling (#12385)
- This change goes from pooling just the HttpContext to pooling the entire TContext. In the past this was a huge struct that got copied around and now it can be a class. Servers can provide the storage for the TContext via a new `IHostContextContainer<TContext>` interface. 
- Removed IDefaultHttpContextContainer since it's been superseded by IHostContextContainer
- Move DefaultHttpContextFactory to Hosting to take advantage of internal methods
- Also handle a null FeatureCollection and null HttpContext and throw a better exception
2019-07-20 13:07:20 -07:00
John Luo f7ba8f1002
Use Arcade for resx generation (#12179) 2019-07-17 18:31:50 -07:00
Ben Adams 09722d1ce5 MVC use concrete types for DiagnosticListener (#11730)
* MVC use concrete types for DiagnosticListener

* Use DiagnosticListener not DiagnosticSource

* Implement interface explicitly

* Code check

* Feedback

* Feedback

* IReadOnlyDictionary

* Remove InstrumentationContext

* DiagnosticSource in RazorPageActivator

* Code check

* Feedback
2019-07-15 12:38:46 -07:00
Carlos J. Aliaga deb51b83f4 _maxRentedBufferSize up to 1MB (#12143) 2019-07-15 09:53:04 -07:00
David Fowler 72f91b8507
Correctly check for limits in the split buffer case (#12117)
- We were looking all total consumed bytes instead of bytes consumed since the last time we parsed a form value. This resulted in thinking that the key or value was too long if it couldn't be parsed after having parsed a bunch of data in the same read.
- Added tests
2019-07-12 09:46:35 -07:00
Ryan Brandenburg 33eb8ba552
More doc comment additions (#11697)
More doc comment additions
2019-07-03 10:21:13 -07:00
Ryan Nowak 1c126ab773 Get rid of pubternal in routing
The only pubternal that remains is DfaGraphWriter - it's a good use case
for pubternal because it's something we want to expose, but we'd never
service and would willingly break the API in the future. It's also
really unlikly that anyone would build on top of it.
2019-07-01 14:11:13 -07:00
David Fowler d3640d59a2
Add a diagnostic source event that fires when a route is matched (#11685)
* Add a diagnostic source event that fires when a route is matched
- Usually more information becomes available about a request once route is matched. This event shoud allow diagnositc systems to enlighten the typical "begin request" metadata to include more information about the matched route and more importantly the selected endpoint and associated metadata.

* Update src/Http/Routing/test/UnitTests/EndpointRoutingMiddlewareTest.cs

Co-Authored-By: campersau <buchholz.bastian@googlemail.com>

* PR feedback and test fixes
2019-07-01 00:13:37 -07:00
Ben Adams 81b757afcc Pass ReadOnlySequence<byte> via in (#11052) 2019-06-28 14:51:52 -07:00
dotnet-maestro[bot] 921dd947b9
[master] Update dependencies from 3 repositories (#11531)
* Update dependencies from https://github.com/aspnet/Blazor build 20190624.2

- Microsoft.AspNetCore.Blazor.Mono - 0.10.0-preview7.19324.2

* Update dependencies from https://github.com/aspnet/AspNetCore-Tooling build 20190624.2

- Microsoft.NET.Sdk.Razor - 3.0.0-preview7.19324.2
- Microsoft.CodeAnalysis.Razor - 3.0.0-preview7.19324.2
- Microsoft.AspNetCore.Razor.Language - 3.0.0-preview7.19324.2
- Microsoft.AspNetCore.Mvc.Razor.Extensions - 3.0.0-preview7.19324.2

* Update EFCore and Extensions

* Update dependencies from https://github.com/aspnet/EntityFrameworkCore build 20190624.5

- Microsoft.EntityFrameworkCore.Tools - 3.0.0-preview7.19324.5
- Microsoft.EntityFrameworkCore.SqlServer - 3.0.0-preview7.19324.5
- dotnet-ef - 3.0.0-preview7.19324.5
- Microsoft.EntityFrameworkCore - 3.0.0-preview7.19324.5
- Microsoft.EntityFrameworkCore.InMemory - 3.0.0-preview7.19324.5
- Microsoft.EntityFrameworkCore.Relational - 3.0.0-preview7.19324.5
- Microsoft.EntityFrameworkCore.Sqlite - 3.0.0-preview7.19324.5

Dependency coherency updates

- Microsoft.AspNetCore.Analyzer.Testing - 3.0.0-preview7.19324.1 (parent: Microsoft.EntityFrameworkCore)
- Microsoft.AspNetCore.BenchmarkRunner.Sources - 3.0.0-preview7.19324.1 (parent: Microsoft.EntityFrameworkCore)
- Microsoft.Extensions.ActivatorUtilities.Sources - 3.0.0-preview7.19324.1 (parent: Microsoft.EntityFrameworkCore)
- Microsoft.Extensions.Caching.Abstractions - 3.0.0-preview7.19324.1 (parent: Microsoft.EntityFrameworkCore)
- Microsoft.Extensions.Caching.Memory - 3.0.0-preview7.19324.1 (parent: Microsoft.EntityFrameworkCore)
- Microsoft.Extensions.Caching.SqlServer - 3.0.0-preview7.19324.1 (parent: Microsoft.EntityFrameworkCore)
- Microsoft.Extensions.Caching.StackExchangeRedis - 3.0.0-preview7.19324.1 (parent: Microsoft.EntityFrameworkCore)
- Microsoft.Extensions.CommandLineUtils.Sources - 3.0.0-preview7.19324.1 (parent: Microsoft.EntityFrameworkCore)
- Microsoft.Extensions.Configuration.Abstractions - 3.0.0-preview7.19324.1 (parent: Microsoft.EntityFrameworkCore)
- Microsoft.Extensions.Configuration.AzureKeyVault - 3.0.0-preview7.19324.1 (parent: Microsoft.EntityFrameworkCore)
- Microsoft.Extensions.Configuration.Binder - 3.0.0-preview7.19324.1 (parent: Microsoft.EntityFrameworkCore)
- Microsoft.Extensions.Configuration.CommandLine - 3.0.0-preview7.19324.1 (parent: Microsoft.EntityFrameworkCore)
- Microsoft.Extensions.Configuration.EnvironmentVariables - 3.0.0-preview7.19324.1 (parent: Microsoft.EntityFrameworkCore)
- Microsoft.Extensions.Configuration.FileExtensions - 3.0.0-preview7.19324.1 (parent: Microsoft.EntityFrameworkCore)
- Microsoft.Extensions.Configuration.Ini - 3.0.0-preview7.19324.1 (parent: Microsoft.EntityFrameworkCore)
- Microsoft.Extensions.Configuration.Json - 3.0.0-preview7.19324.1 (parent: Microsoft.EntityFrameworkCore)
- Microsoft.Extensions.Configuration.KeyPerFile - 3.0.0-preview7.19324.1 (parent: Microsoft.EntityFrameworkCore)
- Microsoft.Extensions.Configuration.UserSecrets - 3.0.0-preview7.19324.1 (parent: Microsoft.EntityFrameworkCore)
- Microsoft.Extensions.Configuration.Xml - 3.0.0-preview7.19324.1 (parent: Microsoft.EntityFrameworkCore)
- Microsoft.Extensions.Configuration - 3.0.0-preview7.19324.1 (parent: Microsoft.EntityFrameworkCore)
- Microsoft.Extensions.DependencyInjection.Abstractions - 3.0.0-preview7.19324.1 (parent: Microsoft.EntityFrameworkCore)
- Microsoft.Extensions.DependencyInjection - 3.0.0-preview7.19324.1 (parent: Microsoft.EntityFrameworkCore)
- Microsoft.Extensions.DiagnosticAdapter - 3.0.0-preview7.19324.1 (parent: Microsoft.EntityFrameworkCore)
- Microsoft.Extensions.Diagnostics.HealthChecks.Abstractions - 3.0.0-preview7.19324.1 (parent: Microsoft.EntityFrameworkCore)
- Microsoft.Extensions.Diagnostics.HealthChecks - 3.0.0-preview7.19324.1 (parent: Microsoft.EntityFrameworkCore)
- Microsoft.Extensions.FileProviders.Abstractions - 3.0.0-preview7.19324.1 (parent: Microsoft.EntityFrameworkCore)
- Microsoft.Extensions.FileProviders.Composite - 3.0.0-preview7.19324.1 (parent: Microsoft.EntityFrameworkCore)
- Microsoft.Extensions.FileProviders.Embedded - 3.0.0-preview7.19324.1 (parent: Microsoft.EntityFrameworkCore)
- Microsoft.Extensions.FileProviders.Physical - 3.0.0-preview7.19324.1 (parent: Microsoft.EntityFrameworkCore)
- Microsoft.Extensions.FileSystemGlobbing - 3.0.0-preview7.19324.1 (parent: Microsoft.EntityFrameworkCore)
- Microsoft.Extensions.HashCodeCombiner.Sources - 3.0.0-preview7.19324.1 (parent: Microsoft.EntityFrameworkCore)
- Microsoft.Extensions.Hosting.Abstractions - 3.0.0-preview7.19324.1 (parent: Microsoft.EntityFrameworkCore)
- Microsoft.Extensions.Hosting - 3.0.0-preview7.19324.1 (parent: Microsoft.EntityFrameworkCore)
- Microsoft.Extensions.HostFactoryResolver.Sources - 3.0.0-preview7.19324.1 (parent: Microsoft.EntityFrameworkCore)
- Microsoft.Extensions.Http - 3.0.0-preview7.19324.1 (parent: Microsoft.EntityFrameworkCore)
- Microsoft.Extensions.Localization.Abstractions - 3.0.0-preview7.19324.1 (parent: Microsoft.EntityFrameworkCore)
- Microsoft.Extensions.Localization - 3.0.0-preview7.19324.1 (parent: Microsoft.EntityFrameworkCore)
- Microsoft.Extensions.Logging.Abstractions - 3.0.0-preview7.19324.1 (parent: Microsoft.EntityFrameworkCore)
- Microsoft.Extensions.Logging.AzureAppServices - 3.0.0-preview7.19324.1 (parent: Microsoft.EntityFrameworkCore)
- Microsoft.Extensions.Logging.Configuration - 3.0.0-preview7.19324.1 (parent: Microsoft.EntityFrameworkCore)
- Microsoft.Extensions.Logging.Console - 3.0.0-preview7.19324.1 (parent: Microsoft.EntityFrameworkCore)
- Microsoft.Extensions.Logging.Debug - 3.0.0-preview7.19324.1 (parent: Microsoft.EntityFrameworkCore)
- Microsoft.Extensions.Logging.EventSource - 3.0.0-preview7.19324.1 (parent: Microsoft.EntityFrameworkCore)
- Microsoft.Extensions.Logging.EventLog - 3.0.0-preview7.19324.1 (parent: Microsoft.EntityFrameworkCore)
- Microsoft.Extensions.Logging.TraceSource - 3.0.0-preview7.19324.1 (parent: Microsoft.EntityFrameworkCore)
- Microsoft.Extensions.Logging.Testing - 3.0.0-preview7.19324.1 (parent: Microsoft.EntityFrameworkCore)
- Microsoft.Extensions.ObjectPool - 3.0.0-preview7.19324.1 (parent: Microsoft.EntityFrameworkCore)
- Microsoft.Extensions.Options.ConfigurationExtensions - 3.0.0-preview7.19324.1 (parent: Microsoft.EntityFrameworkCore)
- Microsoft.Extensions.Options.DataAnnotations - 3.0.0-preview7.19324.1 (parent: Microsoft.EntityFrameworkCore)
- Microsoft.Extensions.Options - 3.0.0-preview7.19324.1 (parent: Microsoft.EntityFrameworkCore)
- Microsoft.Extensions.ParameterDefaultValue.Sources - 3.0.0-preview7.19324.1 (parent: Microsoft.EntityFrameworkCore)
- Microsoft.Extensions.Primitives - 3.0.0-preview7.19324.1 (parent: Microsoft.EntityFrameworkCore)
- Microsoft.Extensions.TypeNameHelper.Sources - 3.0.0-preview7.19324.1 (parent: Microsoft.EntityFrameworkCore)
- Microsoft.Extensions.ValueStopwatch.Sources - 3.0.0-preview7.19324.1 (parent: Microsoft.EntityFrameworkCore)
- Microsoft.Extensions.WebEncoders - 3.0.0-preview7.19324.1 (parent: Microsoft.EntityFrameworkCore)
- Microsoft.Internal.Extensions.Refs - 3.0.0-preview7.19324.1 (parent: Microsoft.EntityFrameworkCore)
- Microsoft.JSInterop - 3.0.0-preview7.19324.1 (parent: Microsoft.EntityFrameworkCore)
- Mono.WebAssembly.Interop - 3.0.0-preview7.19324.1 (parent: Microsoft.EntityFrameworkCore)
- Microsoft.Bcl.AsyncInterfaces - 1.0.0-preview7.19320.1 (parent: Microsoft.NETCore.App.Runtime.win-x64)
- Microsoft.NETCore.App.Runtime.win-x64 - 3.0.0-preview7-27823-05 (parent: Microsoft.Extensions.Logging)
- Microsoft.Extensions.Logging - 3.0.0-preview7.19324.1 (parent: Microsoft.EntityFrameworkCore)
- Microsoft.CSharp - 4.6.0-preview7.19320.1 (parent: Microsoft.NETCore.App.Runtime.win-x64)
- Microsoft.NETCore.App.Runtime.win-x64 - 3.0.0-preview7-27823-05 (parent: Microsoft.Extensions.Logging)
- Microsoft.Extensions.Logging - 3.0.0-preview7.19324.1 (parent: Microsoft.EntityFrameworkCore)
- Microsoft.Win32.Registry - 4.6.0-preview7.19320.1 (parent: Microsoft.NETCore.App.Runtime.win-x64)
- Microsoft.NETCore.App.Runtime.win-x64 - 3.0.0-preview7-27823-05 (parent: Microsoft.Extensions.Logging)
- Microsoft.Extensions.Logging - 3.0.0-preview7.19324.1 (parent: Microsoft.EntityFrameworkCore)
- System.ComponentModel.Annotations - 4.6.0-preview7.19320.1 (parent: Microsoft.NETCore.App.Runtime.win-x64)
- Microsoft.NETCore.App.Runtime.win-x64 - 3.0.0-preview7-27823-05 (parent: Microsoft.Extensions.Logging)
- Microsoft.Extensions.Logging - 3.0.0-preview7.19324.1 (parent: Microsoft.EntityFrameworkCore)
- System.Diagnostics.EventLog - 4.6.0-preview7.19320.1 (parent: Microsoft.NETCore.App.Runtime.win-x64)
- Microsoft.NETCore.App.Runtime.win-x64 - 3.0.0-preview7-27823-05 (parent: Microsoft.Extensions.Logging)
- Microsoft.Extensions.Logging - 3.0.0-preview7.19324.1 (parent: Microsoft.EntityFrameworkCore)
- System.IO.Pipelines - 4.6.0-preview7.19320.1 (parent: Microsoft.NETCore.App.Runtime.win-x64)
- Microsoft.NETCore.App.Runtime.win-x64 - 3.0.0-preview7-27823-05 (parent: Microsoft.Extensions.Logging)
- Microsoft.Extensions.Logging - 3.0.0-preview7.19324.1 (parent: Microsoft.EntityFrameworkCore)
- System.Net.Http.WinHttpHandler - 4.6.0-preview7.19320.1 (parent: Microsoft.NETCore.App.Runtime.win-x64)
- Microsoft.NETCore.App.Runtime.win-x64 - 3.0.0-preview7-27823-05 (parent: Microsoft.Extensions.Logging)
- Microsoft.Extensions.Logging - 3.0.0-preview7.19324.1 (parent: Microsoft.EntityFrameworkCore)
- System.Net.WebSockets.WebSocketProtocol - 4.6.0-preview7.19320.1 (parent: Microsoft.NETCore.App.Runtime.win-x64)
- Microsoft.NETCore.App.Runtime.win-x64 - 3.0.0-preview7-27823-05 (parent: Microsoft.Extensions.Logging)
- Microsoft.Extensions.Logging - 3.0.0-preview7.19324.1 (parent: Microsoft.EntityFrameworkCore)
- System.Reflection.Metadata - 1.7.0-preview7.19320.1 (parent: Microsoft.NETCore.App.Runtime.win-x64)
- Microsoft.NETCore.App.Runtime.win-x64 - 3.0.0-preview7-27823-05 (parent: Microsoft.Extensions.Logging)
- Microsoft.Extensions.Logging - 3.0.0-preview7.19324.1 (parent: Microsoft.EntityFrameworkCore)
- System.Runtime.CompilerServices.Unsafe - 4.6.0-preview7.19320.1 (parent: Microsoft.NETCore.App.Runtime.win-x64)
- Microsoft.NETCore.App.Runtime.win-x64 - 3.0.0-preview7-27823-05 (parent: Microsoft.Extensions.Logging)
- Microsoft.Extensions.Logging - 3.0.0-preview7.19324.1 (parent: Microsoft.EntityFrameworkCore)
- System.Security.Cryptography.Cng - 4.6.0-preview7.19320.1 (parent: Microsoft.NETCore.App.Runtime.win-x64)
- Microsoft.NETCore.App.Runtime.win-x64 - 3.0.0-preview7-27823-05 (parent: Microsoft.Extensions.Logging)
- Microsoft.Extensions.Logging - 3.0.0-preview7.19324.1 (parent: Microsoft.EntityFrameworkCore)
- System.Security.Cryptography.Pkcs - 4.6.0-preview7.19320.1 (parent: Microsoft.NETCore.App.Runtime.win-x64)
- Microsoft.NETCore.App.Runtime.win-x64 - 3.0.0-preview7-27823-05 (parent: Microsoft.Extensions.Logging)
- Microsoft.Extensions.Logging - 3.0.0-preview7.19324.1 (parent: Microsoft.EntityFrameworkCore)
- System.Security.Cryptography.Xml - 4.6.0-preview7.19320.1 (parent: Microsoft.NETCore.App.Runtime.win-x64)
- Microsoft.NETCore.App.Runtime.win-x64 - 3.0.0-preview7-27823-05 (parent: Microsoft.Extensions.Logging)
- Microsoft.Extensions.Logging - 3.0.0-preview7.19324.1 (parent: Microsoft.EntityFrameworkCore)
- System.Security.Permissions - 4.6.0-preview7.19320.1 (parent: Microsoft.NETCore.App.Runtime.win-x64)
- Microsoft.NETCore.App.Runtime.win-x64 - 3.0.0-preview7-27823-05 (parent: Microsoft.Extensions.Logging)
- Microsoft.Extensions.Logging - 3.0.0-preview7.19324.1 (parent: Microsoft.EntityFrameworkCore)
- System.Security.Principal.Windows - 4.6.0-preview7.19320.1 (parent: Microsoft.NETCore.App.Runtime.win-x64)
- Microsoft.NETCore.App.Runtime.win-x64 - 3.0.0-preview7-27823-05 (parent: Microsoft.Extensions.Logging)
- Microsoft.Extensions.Logging - 3.0.0-preview7.19324.1 (parent: Microsoft.EntityFrameworkCore)
- System.ServiceProcess.ServiceController - 4.6.0-preview7.19320.1 (parent: Microsoft.NETCore.App.Runtime.win-x64)
- Microsoft.NETCore.App.Runtime.win-x64 - 3.0.0-preview7-27823-05 (parent: Microsoft.Extensions.Logging)
- Microsoft.Extensions.Logging - 3.0.0-preview7.19324.1 (parent: Microsoft.EntityFrameworkCore)
- System.Text.Encodings.Web - 4.6.0-preview7.19320.1 (parent: Microsoft.NETCore.App.Runtime.win-x64)
- Microsoft.NETCore.App.Runtime.win-x64 - 3.0.0-preview7-27823-05 (parent: Microsoft.Extensions.Logging)
- Microsoft.Extensions.Logging - 3.0.0-preview7.19324.1 (parent: Microsoft.EntityFrameworkCore)
- System.Text.Json - 4.6.0-preview7.19320.1 (parent: Microsoft.NETCore.App.Runtime.win-x64)
- Microsoft.NETCore.App.Runtime.win-x64 - 3.0.0-preview7-27823-05 (parent: Microsoft.Extensions.Logging)
- Microsoft.Extensions.Logging - 3.0.0-preview7.19324.1 (parent: Microsoft.EntityFrameworkCore)
- System.Threading.Channels - 4.6.0-preview7.19320.1 (parent: Microsoft.NETCore.App.Runtime.win-x64)
- Microsoft.NETCore.App.Runtime.win-x64 - 3.0.0-preview7-27823-05 (parent: Microsoft.Extensions.Logging)
- Microsoft.Extensions.Logging - 3.0.0-preview7.19324.1 (parent: Microsoft.EntityFrameworkCore)
- Microsoft.Extensions.DependencyModel - 3.0.0-preview7-27823-05 (parent: Microsoft.Extensions.Logging)
- Microsoft.Extensions.Logging - 3.0.0-preview7.19324.1 (parent: Microsoft.EntityFrameworkCore)
- Microsoft.NETCore.App.Ref - 3.0.0-preview7-27823-05 (parent: Microsoft.Extensions.Logging)
- Microsoft.Extensions.Logging - 3.0.0-preview7.19324.1 (parent: Microsoft.EntityFrameworkCore)
- NETStandard.Library.Ref - 2.1.0-preview7-27823-05 (parent: Microsoft.Extensions.Logging)
- Microsoft.Extensions.Logging - 3.0.0-preview7.19324.1 (parent: Microsoft.EntityFrameworkCore)
- Microsoft.NETCore.Platforms - 3.0.0-preview7.19320.1 (parent: Microsoft.NETCore.App.Runtime.win-x64)
- Microsoft.NETCore.App.Runtime.win-x64 - 3.0.0-preview7-27823-05 (parent: Microsoft.Extensions.Logging)
- Microsoft.Extensions.Logging - 3.0.0-preview7.19324.1 (parent: Microsoft.EntityFrameworkCore)
- Internal.AspNetCore.Analyzers - 3.0.0-preview7.19324.1 (parent: Microsoft.EntityFrameworkCore)
- Microsoft.AspNetCore.Testing - 3.0.0-preview7.19324.1 (parent: Microsoft.EntityFrameworkCore)

* Ingest new EFCore

* Fix Routing tests

* Fix antiforgery

* Fix CORS

* Fix Mvc.Core

* Fix SignalR.Client

* Fix SignalR better
2019-06-25 23:05:54 +00:00
David Fowler 9b59fe40cf
Added some doc comments to bedrock APIs (#11487)
* Added some doc comments to bedrock APIs
- Also cleaned up some HttpContext doc comments

* Apply suggestions from code review

PR feedback

Co-Authored-By: Andrew Stanton-Nurse <andrew@stanton-nurse.com>

* Apply suggestions from code review

Co-Authored-By: Justin Kotalik <jukotali@microsoft.com>
2019-06-24 14:06:01 -07:00
Ryan Nowak 6ce8a879ae Add dynamic controller/page routes
Adds infrastructure for a common IRouter-based pattern. In this pattern,
an extender subclasses Route to post-process the route values before MVC
action selection run. The new infrastructure duplicates this kind of
experience but based on endpoint routing.

The approach in this PR starts at the bottom... meaning that this is the
most-focused and least-invasive way to implement a feature like this.
Similar to fallback routing, this is a pattern built with matcher
policies and metadata rather than a built-in feature of routing.

It's valuable to point out that this approach uses IActionConstraint to
disambiguate between actions. The other way we could go would be to make
the *other* matcher policy implementations able to do this. This would
mean that whenever you have a dynamic endpoint, you will not by using
the DFA for features like HTTP methods. It also means that we need to go
re-implement a bunch of infrastructure.

This PR also adds the concept of an 'inert' endpoint - a non-Routable
endpoint that's created when fallback/dynamic is in use. This seems like
a cleaner design because we don't start *matching* RouteEndpoint
instances for URLs that don't match. This resolves #8130
2019-06-24 08:08:54 -07:00
Chris Ross 4ef204e13b
Remove or make public pubternals for Http #11312 (#11429) 2019-06-21 17:56:53 -07:00
Hao Kung 51919cb631
Improve error message when no auth scheme specified (#11348) 2019-06-18 23:30:47 -07:00
Chris Ross 9077b38805
Implement IHttpResetFeature in Kestrel #10886 (#11300) 2019-06-18 11:14:40 -07:00
Martin Costello cc96e988f4 More read interface IList.Count once rather than per iteration + miscellany (#11253)
* Read interface IList.Count once rather than per iteration

Inspired by #9962, read .Count once rather than once per loop iteration.

* Use nameof() instead of ToString()

Use constant nameof() on enum value, rather than runtime ToString().

* Right-size dictionary

Initialize dictionary with a fixed number of elements to the number of elements it contains.

* Use DisposeAsync()

Use DisposeAsync() on FileBufferingReadStream in input formatters.

* Override DisposeAsync()

Override DisposeAsync() to call DisposeAsync() on the inner stream.

* Use GetValueOrDefault() for content-length

Use GetValueOrDefault() to read the content length once instead of checking HasValue once and Value up to three times.

* Update Microsoft.AspNetCore.WebUtilities.netcoreapp3.0.cs

Add DisposeAsync().

* Use DisposeAsync()

Use DisposeAsync() on transcoding streams as other formatters do.
2019-06-17 11:22:45 -07:00
Chris Ross bc5bee7477
Implement Http/2 CompleteAsync #10886 (#11193) 2019-06-15 09:01:45 -07:00
Javier Calvarro Nelson f652c22202
[Fixes #11183] Race condition in RouteBase.EnsureLoggers (#11218)
[Fixes #11183] Race condition in RouteBase.EnsureLoggers
2019-06-15 00:54:14 +02:00
Justin Kotalik d7fc06af5e
Move IServerVariablesFeature to Http.Features (#11007) 2019-06-10 21:16:36 -07:00
Günther Foidl 90ab2cb965 Spanified Webencoders.Base64UrlEncode (#11047) 2019-06-10 18:18:31 -07:00
David Fowler d4a982fefa
Reduce allocations when Activity is enabled (#11020)
- Remove string allocations caused by DiagnosticSource.Stop/StartActivity
- Pass the HttpContext directly as the object for StartActivity and StopActivity to avoid the anonymous object allocation.
- Though it's a bit ugly, added an HttpContext property to DefaultHttpContext to avoid breaking back-compat (which had to do reflection to get the HttpContext property anyways)
2019-06-10 13:37:15 -07:00
Ben Adams 37e6ad7e12 Improve HostFiltering perf (#9359) 2019-06-10 09:32:00 -07:00
Kahbazi b4b3aa9c94 Return an empty list instead of null for IHeaderDictionary extensions #3486 (#10972) 2019-06-09 09:45:36 -07:00
Nate McMaster 41ce223c1c
Replace Internal.AspNetCore.Sdk with Microsoft.DotNet.Arcade.Sdk (#10674)
* Update build.cmd to install .NET Core into $repoRoot/.dotnet instead of $repoRoot/.dotnet/x64
* Move restore sources from build/sources.props into eng/Versions.props (following arcade conventions)
* Remove usages of RuntimeFrameworkVersion in tests and build
* Update Blazor VSIX to use Arcade VSIX tools
* Rename Common.Tests to IIS.Common.TestLib and make it a test asset
* Remove custom versions props for ANCM installer code
* Remove duplicate references to xunit and remove usages of IsTestProject
* Remove duplicate references to Internal.AspNetCore.Analyzers
* Import Arcade.Sdk props and targets and remove custom versioning props
* Remove references to Internal.AspNetCore.Sdk
* Rename PackageLicenseType => PackageLicenseExpression
* Remove dependency on tasks in Internal.AspNetCore.Sdk, add ref to Internal.AspNetCore.BuildTasks as a temporary workaround
* Use Arcade's nuspec support
* Rename SignalR.Client.FunctionalTests to SignalR.Client.FunctionalTestApp
* Fixes for changes to property evaluation order
* Update BaseLineGenerator to netcoreapp3.0
* React to changes in evaluation order in RPM files and quirks in using <Exec> instead of <Run>
* Update Microsoft.Extensions.ApiDescription.Server to react to changes in Arcade packaging
* Workaround aspnet/AspNetCore#11009
2019-06-07 17:19:41 -07:00
David Fowler b34acc9e86
Removed BufferSegment (#10982)
- This was leftover from the old StreamPipeReader impl
2019-06-07 08:51:46 -07:00
Kahbazi 69e4a566b3
Fix AuthenticationService summary 2019-06-07 01:35:38 +04:30
Kahbazi c7cb8467bf Use GetEndpoint extension method (#10745) 2019-06-03 09:23:43 -07:00
David Fowler 400835e0b4
Remove Transport.Abstractions from existence (#10722) 2019-06-01 17:22:47 -07:00
Andrew Stanton-Nurse a96642f6fd Remove custom stream->pipe wrappers and make BodyReader/BodyWriter read-only (#10154) 2019-05-31 18:38:25 -07:00
Hao Kung 5d6c2edab0
Require ClaimsPrincipal.Identity.IsAuthenticated for SignIn by default (#9482) 2019-05-31 15:43:00 -07:00
Javier Calvarro Nelson 3f041cee44
Produce Microsoft.AspNetCore.Authorization as a package (#10684)
Produce Microsoft.AspNetCore.Authorization as a package
2019-05-31 21:12:16 +02:00
Ryan Nowak 11061e412e
EndpointMiddleware does not invoke endpoint (#10650)
* EndpointMiddleware does not invoke endpoint

Fixes: #10649

The bug is that the endpoint delegate is not invoked when
SuppressCheckForUnhandledSecurityMetadata is set to true. This option is
provided so that can you suppress the security checks done by routing,
but right now what it does is suppress the entire middleware.

We had tests for the supression cases, but they didn't actually validate
that the middleware did any work, just that we don't throw. Fixed that.

* harden tests
2019-05-30 13:27:09 -07:00
Justin Kotalik e16aa29e67
Make new HttpContext properties virtual (#10613) 2019-05-29 12:47:17 -07:00
Chris Ross 156c4feb65
Put request trailers in a separate collection (#10410) 2019-05-23 09:00:39 -07:00
Hao Kung 16a47948f8
Move AuthZ policy types back into Policy and rejigger AddAuthorization (#10021) 2019-05-20 16:20:19 -07:00
Nate McMaster dc90e11c7a
Move obj and bin directories into repo root (#10063)
The Arcade SDK requires that the obj/ and bin/ folders be placed in the top-level artifacts/ folder of the repo. Although this PR does not complete our Arcade convergence, this is a step towards updating our repo to build with the Arcade SDK.

Changes:
* Set output path for build to artifacts/bin/$(ProjectName)/ 
* Set intermediate output path for build to artifacts/obj/$(ProjectName)/
* Cleanup .gitignore files (remove duplication between repo-root and tested gitignore files)
* Add code check which looks for project files that share the same name (could cause issues)
* Rename project files to have unique names (avoid race condition of build output)
* Update all locations which were hard-coded to expect bin/ and obj/ in the project directory
* Add overrides for tests which still assert test binaries exist in a given location relative to the source code
2019-05-15 13:44:55 -07:00
huysentruitw 18ce50f543 ContentDispositionHeaderValue must encode/sanitize new-line char (#9971) 2019-05-15 09:34:50 -07:00
Ryan Nowak b03bca15de Fix: #10091 2019-05-09 14:00:31 -07:00
Ryan Nowak 15b1566d90 Do something different I guess. 2019-05-09 13:59:38 -07:00
Ryan Nowak 434bf614d5 Make GetOrdereredMetadata return something good 2019-05-09 13:59:38 -07:00
Ryan Nowak 24784d0681 Fix #10066 2019-05-09 13:44:16 -07:00
Justin Kotalik c22de8f39c
Add retries to helix failures and re-enable helix as a required workload (#9221) 2019-05-08 08:21:44 -07:00
Ryan Nowak 0a1d68b8f3 Remove EndpointSelectorContext 2019-05-08 08:14:24 -07:00
Doug Bunting 58c67727df
Update all the things (except EF Core dependencies) (#10025)
- see #9923 for related discussion
- pin aspnet/EntityFrameworkCore dependencies
- chain aspnet/Extensions dependencies through aspnet/AspNetCore-Tooling instead
- run `darc` to grab the latest
- remove System.Text.Encodings.Web references
  - now included in runtime.*.Microsoft.NETCORE.App packages

nits:
- copy a few `ReferenceResolution.md changes from aspnet/Extensions version
2019-05-07 22:06:39 -07:00
Ryan Nowak d3400f7cb2
Fix: #6882 - Explode UseBlazor (#9449)
This changes the recipe for client-side blazor to use similar primitives
to server side applications.

---

I ignored auto-rebuild support because it's currently dead code until we
have that in VS. If we add auto-rebuild to ASP.NET Core - we'd probably want
to make that a separate gesture inside `IsDevelopement()` like other
dev-time features anyway.

---

The static files hookup is a special thing because creating the file
server for a client-side Blazor app involves some non-trivial work. We
plan to make this better in the future.

What's nice about this pattern is that the implementation is pretty
simple and literal, and it scales fine if you have multiple Blazor
client-side apps.

I didn't provide a lot of options here, it's pretty much the same as
UseBlazor.

---

I feel pretty good about the wireup with routing to use the
`index.html` from the client app. I think it's pretty to-the-point.
2019-05-06 18:09:26 -07:00
huysentruitw e436fd9d08 Add support for Redirect preserving method/body (HTTP 307 and 308) (#9968) 2019-05-06 15:07:07 -07:00
Ben Adams 19c9010c2f Read interface IList.Count once rather than per iteration (#9962) 2019-05-04 17:54:12 -07:00
Pranav K 093df67c06
Avoid buffering during input formatting for longer than necessary (#9806)
* Avoid buffering during input formatting for longer than necessary

EnableRewind uses FileBufferingReadStream which is not disposed until the response is completed.
This results in holding on to internal buffers for significantly longer than necessary. Changing it
to  return the buffers immediately improved the allocations and throughput.
2019-05-03 06:45:52 -07:00
Ryan Nowak 127bc7ddd3
Fixes: #4597 Parse URI path with an endpoint (#9728)
Adds functionality to parse a URI path given a way to
find an endpoint. This is the replacement for various machinications
using the global route collection and `RouteData.Routers` in earlier
versions.

For now I'm just adding a way to do this using Endpoint Name since it's
a pretty low level feature. Endpoint Name is also very direct, so it
feels good for something like this.
2019-05-02 21:11:59 -07:00
James Newton-King da66edc8ff
Change IEndpointConventionBuilder extension methods to use generic argument (#8906) 2019-05-02 07:25:54 +12:00
Ben Adams 86728ecc17 Seal some internal derived classes (#9880) 2019-05-01 10:29:05 -07:00
David Fowler 8af14399b6
Use spans for complex segments (#9817) 2019-04-30 22:56:53 -07:00
Nate McMaster ae8e96f154
Remove API check baselines and related project settings (#9846) 2019-04-30 14:58:13 -07:00
Ben Adams caf4374f83 Speed up PathStringHelper (#9709) 2019-04-30 08:13:03 -07:00
Gérald Barré 2624e73172 Remove useless ToString (#9811) 2019-04-29 08:56:54 -07:00
David Fowler 0d77594d17
Make endpoint routing allocation free in common scenarios (#9774)
- This change tries to remove the EndpointSelectoContext allocation by making it a wrapper struct over the HttpContext. Unlike before, the HttpContext gets mutated once any component in the routnig pipeline sets a non null endpoint. This used to happen after the processing was complete.
- This change also implements the IRouteValuesFeature and IEndpointFeature in HttpProtocol to avoid the feature allocation and feature collection version churn.
- We also set the IRouteValuesFeature in IRouter based scenarios.
- Since we're not implementing IRoutingFeature in endpoint routing anymore
we can just create the RouteData inside MVC. We do this by polyfilling RouteData when using endpoint routing inside of MVC
- Implement GetRouteValue in terms of IRouteValuesFeature
- Noop if the EndpointRoutingMiddleware if an endpoint is already set
- Added tests
2019-04-28 21:29:08 -07:00
Ben Adams e22702891d Pass catchAll ValueTuple via in (#9807) 2019-04-29 12:28:48 +12:00
Ryan Nowak 2767e69bdd
Avoid allocations in more cases (#9788)
* Avoid allocations in more cases

Updates to DFA Matcher to avoid allocations in more cases. This makes
the matcher more pay-for-play.

- Avoid allocating an RVD while matching if possible
- Avoid allocating the candidate set unless necessary

First, avoid creating the RVD unless there are parameters or
constraints. This means that the candidate set can contain null route
value dictionaries. This seems fine because selectors are already
low-level. The route values feature will allocate an RVD when accessed,
so code in MVC or middleware won't even see a null RVD.

Secondly, avoid creating the candidate set unless there are selectors.
This will save an allocation most of the time since we won't need to run
selectors is really common cases. The candidate set is needed because
selectors mix mutability and async, so it needs to be a reference type.
However the default case is that we *don't* need to run selectors. The
impact of this is that we make a bunch of methods have an instance
variant and a static variant that operates on the array.
2019-04-26 19:28:44 -07:00
David Fowler b2457d25f7 Revert "Make endpoint routing allocation free in common scenarios"
This reverts commit 264ae1acd1.
2019-04-26 02:10:25 -07:00
David Fowler 264ae1acd1 Make endpoint routing allocation free in common scenarios
- This change tries to remove the EndpointSelectoContext allocation by making it a wrapper struct over the HttpContext. Unlike before, the HttpContext gets mutated once any component in the routnig pipeline sets a non null endpoint. This used to happen after the processing was complete.
- This change also implements the IRouteValuesFeature and IEndpointFeature in HttpProtocol to avoid the feature allocation and feature collection version churn.
2019-04-26 02:08:53 -07:00
James Newton-King 8ce7bd171d
Make RouteOptions.EndpointDataSources internal (#9708) 2019-04-26 07:54:27 +12:00
Bruno Costa dafb4d38f0 Fix documentation typo (#9740) 2019-04-25 08:43:13 -07:00
dotnet-maestro[bot] 8eb2e8baec
[master] Update dependencies from dotnet/arcade (#9715)
* Update dependencies from https://github.com/dotnet/arcade build 20190423.2

- Microsoft.DotNet.GenAPI - 1.0.0-beta.19223.2

* Adjust to GenApi change in `enum` ordering
- was sorted by name, now by value
2019-04-24 19:21:37 +00:00
Pranav K 9ac2f52b22
Specify Content-Length for buffered responses (#9699) 2019-04-24 09:57:53 -07:00
Ben Adams bae733151b Lazy create RequestServicesFeature DisposeAsync statemachine (#9512) 2019-04-22 17:21:19 -07:00
Ben Adams f4972dc6b6 Skip string.Equals in FastPathTokenizer (#9579) 2019-04-22 10:06:21 -07:00
Ben Adams 48c97b425e Use .IndexOf(char/byte) where possible (#9539) 2019-04-22 10:05:40 -07:00
David Fowler d62d33c531
Avoid allocating the CandidateSet when there's a single match (#9622)
- Add fast path for 0 route values, and policies
- Remove RVD allocation in the fast path
2019-04-21 23:33:40 -07:00
John Luo 7a040f310b
Enable Pubternal API checks (#9530)
* Enable Pubternal API checks

* Use pragma

* Convert to pragma

* Test fix

* Remove extra restore dependencies
2019-04-19 18:49:07 -07:00
Ben Adams 5ff2910d09 UriHelper use Ordinal string.IndexOf (#9537) 2019-04-19 10:14:03 -07:00
Ben Adams 23efa15112 Lazy create EndpointRouting statemachines (#9506) 2019-04-18 16:40:06 -07:00
Justin Kotalik eb41de88a9
Fix flaky routing test (#9505) 2019-04-18 13:40:43 -07:00
Ben Adams 8fcadf72cd Allow headers to match on ReferenceEquals before OrdinalIgnoreCase (#9341) 2019-04-18 12:00:01 -07:00
Pranav K 92cae6faab
Buffer writes from sources of synchronous writes (#9015)
* Buffer writes from sources of synchronous writes

Fixes https://github.com/aspnet/AspNetCore/issues/6397
2019-04-17 18:11:07 -07:00
Ryan Nowak 4f57a4af14 Address Jimmys cool feedback 2019-04-16 19:36:32 -07:00
Ryan Nowak 84916223bb Address Bens cool feedback 2019-04-16 19:36:32 -07:00
Ryan Nowak 4f015e2813 Add ability to replace an endpoint with a collection
This is a crucial enabler for dynamic scenarios. A policy can replace an
endpoint with a *group* of dynamic endpoints which will be disambiguated
by other policies.
2019-04-16 19:36:32 -07:00
Ryan Nowak e47fbbab9e Slim down CandidateSet 2019-04-16 19:36:32 -07:00
Ryan Nowak eca6a71754 Implement IEndpointSelectorPolicy for HttpMethodMatcherPolicy 2019-04-16 19:36:32 -07:00
Ryan Nowak 8df3dc7ae4 Make HostMatcherPolicy implement IEndpointSelectorPolicy 2019-04-16 19:36:32 -07:00
Ryan Nowak 94fab79771 Add some cool docs about IDynamicEndpointMetadata.
This will make James happy, which makes it more likely he will
look at the rest of the PR.
2019-04-16 19:36:32 -07:00
dotnet-maestro[bot] 039e505160
[master] Update dependencies from 2 repositories (#9411)
* Update dependencies from https://github.com/aspnet/EntityFrameworkCore build 20190415.3

- Microsoft.EntityFrameworkCore.Tools - 3.0.0-preview5.19215.3
- Microsoft.EntityFrameworkCore.SqlServer - 3.0.0-preview5.19215.3
- dotnet-ef - 3.0.0-preview5.19215.3
- Microsoft.EntityFrameworkCore - 3.0.0-preview5.19215.3
- Microsoft.EntityFrameworkCore.InMemory - 3.0.0-preview5.19215.3
- Microsoft.EntityFrameworkCore.Relational - 3.0.0-preview5.19215.3
- Microsoft.EntityFrameworkCore.Sqlite - 3.0.0-preview5.19215.3

Dependency coherency updates

- Microsoft.AspNetCore.Analyzer.Testing - 3.0.0-preview5.19214.1 (parent: Microsoft.EntityFrameworkCore)
- Microsoft.AspNetCore.BenchmarkRunner.Sources - 3.0.0-preview5.19214.1 (parent: Microsoft.EntityFrameworkCore)
- Microsoft.Extensions.ActivatorUtilities.Sources - 3.0.0-preview5.19214.1 (parent: Microsoft.EntityFrameworkCore)
- Microsoft.Extensions.Caching.Abstractions - 3.0.0-preview5.19214.1 (parent: Microsoft.EntityFrameworkCore)
- Microsoft.Extensions.Caching.Memory - 3.0.0-preview5.19214.1 (parent: Microsoft.EntityFrameworkCore)
- Microsoft.Extensions.Caching.SqlServer - 3.0.0-preview5.19214.1 (parent: Microsoft.EntityFrameworkCore)
- Microsoft.Extensions.Caching.StackExchangeRedis - 3.0.0-preview5.19214.1 (parent: Microsoft.EntityFrameworkCore)
- Microsoft.Extensions.CommandLineUtils.Sources - 3.0.0-preview5.19214.1 (parent: Microsoft.EntityFrameworkCore)
- Microsoft.Extensions.Configuration.Abstractions - 3.0.0-preview5.19214.1 (parent: Microsoft.EntityFrameworkCore)
- Microsoft.Extensions.Configuration.AzureKeyVault - 3.0.0-preview5.19214.1 (parent: Microsoft.EntityFrameworkCore)
- Microsoft.Extensions.Configuration.Binder - 3.0.0-preview5.19214.1 (parent: Microsoft.EntityFrameworkCore)
- Microsoft.Extensions.Configuration.CommandLine - 3.0.0-preview5.19214.1 (parent: Microsoft.EntityFrameworkCore)
- Microsoft.Extensions.Configuration.EnvironmentVariables - 3.0.0-preview5.19214.1 (parent: Microsoft.EntityFrameworkCore)
- Microsoft.Extensions.Configuration.FileExtensions - 3.0.0-preview5.19214.1 (parent: Microsoft.EntityFrameworkCore)
- Microsoft.Extensions.Configuration.Ini - 3.0.0-preview5.19214.1 (parent: Microsoft.EntityFrameworkCore)
- Microsoft.Extensions.Configuration.Json - 3.0.0-preview5.19214.1 (parent: Microsoft.EntityFrameworkCore)
- Microsoft.Extensions.Configuration.KeyPerFile - 3.0.0-preview5.19214.1 (parent: Microsoft.EntityFrameworkCore)
- Microsoft.Extensions.Configuration.UserSecrets - 3.0.0-preview5.19214.1 (parent: Microsoft.EntityFrameworkCore)
- Microsoft.Extensions.Configuration.Xml - 3.0.0-preview5.19214.1 (parent: Microsoft.EntityFrameworkCore)
- Microsoft.Extensions.Configuration - 3.0.0-preview5.19214.1 (parent: Microsoft.EntityFrameworkCore)
- Microsoft.Extensions.DependencyInjection.Abstractions - 3.0.0-preview5.19214.1 (parent: Microsoft.EntityFrameworkCore)
- Microsoft.Extensions.DependencyInjection - 3.0.0-preview5.19214.1 (parent: Microsoft.EntityFrameworkCore)
- Microsoft.Extensions.DiagnosticAdapter - 3.0.0-preview5.19214.1 (parent: Microsoft.EntityFrameworkCore)
- Microsoft.Extensions.Diagnostics.HealthChecks.Abstractions - 3.0.0-preview5.19214.1 (parent: Microsoft.EntityFrameworkCore)
- Microsoft.Extensions.Diagnostics.HealthChecks - 3.0.0-preview5.19214.1 (parent: Microsoft.EntityFrameworkCore)
- Microsoft.Extensions.FileProviders.Abstractions - 3.0.0-preview5.19214.1 (parent: Microsoft.EntityFrameworkCore)
- Microsoft.Extensions.FileProviders.Composite - 3.0.0-preview5.19214.1 (parent: Microsoft.EntityFrameworkCore)
- Microsoft.Extensions.FileProviders.Embedded - 3.0.0-preview5.19214.1 (parent: Microsoft.EntityFrameworkCore)
- Microsoft.Extensions.FileProviders.Physical - 3.0.0-preview5.19214.1 (parent: Microsoft.EntityFrameworkCore)
- Microsoft.Extensions.FileSystemGlobbing - 3.0.0-preview5.19214.1 (parent: Microsoft.EntityFrameworkCore)
- Microsoft.Extensions.HashCodeCombiner.Sources - 3.0.0-preview5.19214.1 (parent: Microsoft.EntityFrameworkCore)
- Microsoft.Extensions.Hosting.Abstractions - 3.0.0-preview5.19214.1 (parent: Microsoft.EntityFrameworkCore)
- Microsoft.Extensions.Hosting - 3.0.0-preview5.19214.1 (parent: Microsoft.EntityFrameworkCore)
- Microsoft.Extensions.HostFactoryResolver.Sources - 3.0.0-preview5.19214.1 (parent: Microsoft.EntityFrameworkCore)
- Microsoft.Extensions.Http - 3.0.0-preview5.19214.1 (parent: Microsoft.EntityFrameworkCore)
- Microsoft.Extensions.Localization.Abstractions - 3.0.0-preview5.19214.1 (parent: Microsoft.EntityFrameworkCore)
- Microsoft.Extensions.Localization - 3.0.0-preview5.19214.1 (parent: Microsoft.EntityFrameworkCore)
- Microsoft.Extensions.Logging.Abstractions - 3.0.0-preview5.19214.1 (parent: Microsoft.EntityFrameworkCore)
- Microsoft.Extensions.Logging.AzureAppServices - 3.0.0-preview5.19214.1 (parent: Microsoft.EntityFrameworkCore)
- Microsoft.Extensions.Logging.Configuration - 3.0.0-preview5.19214.1 (parent: Microsoft.EntityFrameworkCore)
- Microsoft.Extensions.Logging.Console - 3.0.0-preview5.19214.1 (parent: Microsoft.EntityFrameworkCore)
- Microsoft.Extensions.Logging.Debug - 3.0.0-preview5.19214.1 (parent: Microsoft.EntityFrameworkCore)
- Microsoft.Extensions.Logging.EventSource - 3.0.0-preview5.19214.1 (parent: Microsoft.EntityFrameworkCore)
- Microsoft.Extensions.Logging.TraceSource - 3.0.0-preview5.19214.1 (parent: Microsoft.EntityFrameworkCore)
- Microsoft.Extensions.Logging.Testing - 3.0.0-preview5.19214.1 (parent: Microsoft.EntityFrameworkCore)
- Microsoft.Extensions.ObjectPool - 3.0.0-preview5.19214.1 (parent: Microsoft.EntityFrameworkCore)
- Microsoft.Extensions.Options.ConfigurationExtensions - 3.0.0-preview5.19214.1 (parent: Microsoft.EntityFrameworkCore)
- Microsoft.Extensions.Options.DataAnnotations - 3.0.0-preview5.19214.1 (parent: Microsoft.EntityFrameworkCore)
- Microsoft.Extensions.Options - 3.0.0-preview5.19214.1 (parent: Microsoft.EntityFrameworkCore)
- Microsoft.Extensions.ParameterDefaultValue.Sources - 3.0.0-preview5.19214.1 (parent: Microsoft.EntityFrameworkCore)
- Microsoft.Extensions.Primitives - 3.0.0-preview5.19214.1 (parent: Microsoft.EntityFrameworkCore)
- Microsoft.Extensions.TypeNameHelper.Sources - 3.0.0-preview5.19214.1 (parent: Microsoft.EntityFrameworkCore)
- Microsoft.Extensions.ValueStopwatch.Sources - 3.0.0-preview5.19214.1 (parent: Microsoft.EntityFrameworkCore)
- Microsoft.Extensions.WebEncoders - 3.0.0-preview5.19214.1 (parent: Microsoft.EntityFrameworkCore)
- Microsoft.Internal.Extensions.Refs - 3.0.0-preview5.19214.1 (parent: Microsoft.EntityFrameworkCore)
- Microsoft.JSInterop - 3.0.0-preview5.19214.1 (parent: Microsoft.EntityFrameworkCore)
- Mono.WebAssembly.Interop - 3.0.0-preview5.19214.1 (parent: Microsoft.EntityFrameworkCore)
- Microsoft.Bcl.Json.Sources - 4.6.0-preview5.19212.14 (parent: Microsoft.NETCore.App)
- Microsoft.NETCore.App - 3.0.0-preview5-27613-11 (parent: Microsoft.Extensions.Logging)
- Microsoft.Extensions.Logging - 3.0.0-preview5.19214.1 (parent: Microsoft.EntityFrameworkCore)
- Microsoft.CSharp - 4.6.0-preview5.19212.14 (parent: Microsoft.NETCore.App)
- Microsoft.NETCore.App - 3.0.0-preview5-27613-11 (parent: Microsoft.Extensions.Logging)
- Microsoft.Extensions.Logging - 3.0.0-preview5.19214.1 (parent: Microsoft.EntityFrameworkCore)
- Microsoft.Win32.Registry - 4.6.0-preview5.19212.14 (parent: Microsoft.NETCore.App)
- Microsoft.NETCore.App - 3.0.0-preview5-27613-11 (parent: Microsoft.Extensions.Logging)
- Microsoft.Extensions.Logging - 3.0.0-preview5.19214.1 (parent: Microsoft.EntityFrameworkCore)
- System.ComponentModel.Annotations - 4.6.0-preview5.19212.14 (parent: Microsoft.NETCore.App)
- Microsoft.NETCore.App - 3.0.0-preview5-27613-11 (parent: Microsoft.Extensions.Logging)
- Microsoft.Extensions.Logging - 3.0.0-preview5.19214.1 (parent: Microsoft.EntityFrameworkCore)
- System.Data.SqlClient - 4.7.0-preview5.19212.14 (parent: Microsoft.NETCore.App)
- Microsoft.NETCore.App - 3.0.0-preview5-27613-11 (parent: Microsoft.Extensions.Logging)
- Microsoft.Extensions.Logging - 3.0.0-preview5.19214.1 (parent: Microsoft.EntityFrameworkCore)
- System.Diagnostics.EventLog - 4.6.0-preview5.19212.14 (parent: Microsoft.NETCore.App)
- Microsoft.NETCore.App - 3.0.0-preview5-27613-11 (parent: Microsoft.Extensions.Logging)
- Microsoft.Extensions.Logging - 3.0.0-preview5.19214.1 (parent: Microsoft.EntityFrameworkCore)
- System.IO.Pipelines - 4.6.0-preview5.19212.14 (parent: Microsoft.NETCore.App)
- Microsoft.NETCore.App - 3.0.0-preview5-27613-11 (parent: Microsoft.Extensions.Logging)
- Microsoft.Extensions.Logging - 3.0.0-preview5.19214.1 (parent: Microsoft.EntityFrameworkCore)
- System.Net.Http.WinHttpHandler - 4.6.0-preview5.19212.14 (parent: Microsoft.NETCore.App)
- Microsoft.NETCore.App - 3.0.0-preview5-27613-11 (parent: Microsoft.Extensions.Logging)
- Microsoft.Extensions.Logging - 3.0.0-preview5.19214.1 (parent: Microsoft.EntityFrameworkCore)
- System.Net.WebSockets.WebSocketProtocol - 4.6.0-preview5.19212.14 (parent: Microsoft.NETCore.App)
- Microsoft.NETCore.App - 3.0.0-preview5-27613-11 (parent: Microsoft.Extensions.Logging)
- Microsoft.Extensions.Logging - 3.0.0-preview5.19214.1 (parent: Microsoft.EntityFrameworkCore)
- System.Reflection.Metadata - 1.7.0-preview5.19212.14 (parent: Microsoft.NETCore.App)
- Microsoft.NETCore.App - 3.0.0-preview5-27613-11 (parent: Microsoft.Extensions.Logging)
- Microsoft.Extensions.Logging - 3.0.0-preview5.19214.1 (parent: Microsoft.EntityFrameworkCore)
- System.Runtime.CompilerServices.Unsafe - 4.6.0-preview5.19212.14 (parent: Microsoft.NETCore.App)
- Microsoft.NETCore.App - 3.0.0-preview5-27613-11 (parent: Microsoft.Extensions.Logging)
- Microsoft.Extensions.Logging - 3.0.0-preview5.19214.1 (parent: Microsoft.EntityFrameworkCore)
- System.Security.Cryptography.Cng - 4.6.0-preview5.19212.14 (parent: Microsoft.NETCore.App)
- Microsoft.NETCore.App - 3.0.0-preview5-27613-11 (parent: Microsoft.Extensions.Logging)
- Microsoft.Extensions.Logging - 3.0.0-preview5.19214.1 (parent: Microsoft.EntityFrameworkCore)
- System.Security.Cryptography.Pkcs - 4.6.0-preview5.19212.14 (parent: Microsoft.NETCore.App)
- Microsoft.NETCore.App - 3.0.0-preview5-27613-11 (parent: Microsoft.Extensions.Logging)
- Microsoft.Extensions.Logging - 3.0.0-preview5.19214.1 (parent: Microsoft.EntityFrameworkCore)
- System.Security.Cryptography.Xml - 4.6.0-preview5.19212.14 (parent: Microsoft.NETCore.App)
- Microsoft.NETCore.App - 3.0.0-preview5-27613-11 (parent: Microsoft.Extensions.Logging)
- Microsoft.Extensions.Logging - 3.0.0-preview5.19214.1 (parent: Microsoft.EntityFrameworkCore)
- System.Security.Permissions - 4.6.0-preview5.19212.14 (parent: Microsoft.NETCore.App)
- Microsoft.NETCore.App - 3.0.0-preview5-27613-11 (parent: Microsoft.Extensions.Logging)
- Microsoft.Extensions.Logging - 3.0.0-preview5.19214.1 (parent: Microsoft.EntityFrameworkCore)
- System.Security.Principal.Windows - 4.6.0-preview5.19212.14 (parent: Microsoft.NETCore.App)
- Microsoft.NETCore.App - 3.0.0-preview5-27613-11 (parent: Microsoft.Extensions.Logging)
- Microsoft.Extensions.Logging - 3.0.0-preview5.19214.1 (parent: Microsoft.EntityFrameworkCore)
- System.ServiceProcess.ServiceController - 4.6.0-preview5.19212.14 (parent: Microsoft.NETCore.App)
- Microsoft.NETCore.App - 3.0.0-preview5-27613-11 (parent: Microsoft.Extensions.Logging)
- Microsoft.Extensions.Logging - 3.0.0-preview5.19214.1 (parent: Microsoft.EntityFrameworkCore)
- System.Text.Encodings.Web - 4.6.0-preview5.19212.14 (parent: Microsoft.NETCore.App)
- Microsoft.NETCore.App - 3.0.0-preview5-27613-11 (parent: Microsoft.Extensions.Logging)
- Microsoft.Extensions.Logging - 3.0.0-preview5.19214.1 (parent: Microsoft.EntityFrameworkCore)
- System.Threading.Channels - 4.6.0-preview5.19212.14 (parent: Microsoft.NETCore.App)
- Microsoft.NETCore.App - 3.0.0-preview5-27613-11 (parent: Microsoft.Extensions.Logging)
- Microsoft.Extensions.Logging - 3.0.0-preview5.19214.1 (parent: Microsoft.EntityFrameworkCore)
- Microsoft.Extensions.DependencyModel - 3.0.0-preview5-27613-11 (parent: Microsoft.Extensions.Logging)
- Microsoft.Extensions.Logging - 3.0.0-preview5.19214.1 (parent: Microsoft.EntityFrameworkCore)
- Microsoft.NETCore.Platforms - 3.0.0-preview5.19212.14 (parent: Microsoft.NETCore.App)
- Microsoft.NETCore.App - 3.0.0-preview5-27613-11 (parent: Microsoft.Extensions.Logging)
- Microsoft.Extensions.Logging - 3.0.0-preview5.19214.1 (parent: Microsoft.EntityFrameworkCore)
- Internal.AspNetCore.Analyzers - 3.0.0-preview5.19214.1 (parent: Microsoft.EntityFrameworkCore)
- Microsoft.AspNetCore.Testing - 3.0.0-preview5.19214.1 (parent: Microsoft.EntityFrameworkCore)

* Update dependencies from https://github.com/aspnet/AspNetCore-Tooling build 20190415.3

- Microsoft.NET.Sdk.Razor - 3.0.0-preview5.19215.3
- Microsoft.CodeAnalysis.Razor - 3.0.0-preview5.19215.3
- Microsoft.AspNetCore.Razor.Language - 3.0.0-preview5.19215.3
- Microsoft.AspNetCore.Mvc.Razor.Extensions - 3.0.0-preview5.19215.3

* Patch utf8 test
2019-04-16 21:40:21 +00:00
Ryan Nowak 763720b092 Remove Routing pubternal
This change makes a bunch of random routing classes internal instead of
pubternal. Most of these have no use case and aren't valuable at all
outside of routing code.

The one exception here is that the only way to construct a
`TemplateBinder` in 1.0-2.2 is using a constructor that accepts some
pubternal types. I don't think it's a good idea to just yank this since
the usage is pretty wide.

Instead I added a factory service so you can create this, and marked the
constructor [Obsolete] where these types are touched. We can make the
actual breaking change in the next major release.
2019-04-14 14:49:17 -07:00
Ben Adams dc08a60f5e Lazy allocate dictionary in ItemsDictionary (#9284) 2019-04-14 08:09:17 -07:00
BrennanConroy 022e79cf17
Improve HeaderSplit perf (#9309) 2019-04-11 22:29:23 -07:00
Pranav K ae34697797 Fix #9041 - Complain if auth hasn't been set up correctly (#9181) 2019-04-11 10:36:21 -07:00
Justin Kotalik 0378cbbc51 Rename StreamPipeReaderOptions to StreamPipeReaderAdapterOptions (#9177) 2019-04-09 17:05:44 -07:00
Ryan Nowak 258d34e382
Use coventional routes for link generation (#9037)
Use coventional routes for link generation

This change enables using conventional routes for link generation when
using MVC conventional routes. This change makes MVC link generation
behaviour highly compatible with 2.1.

The way that this works is that we create endpoints for **MATCHING**
using the denormalized conventional route, but we tell those endpoints
to suppress link generation.

For link generation we generate a non-matching endpoints per-route with
the same order value.

I added the concept of *required value any* to link generation. This is
needed because for an endpoint to participate in link generation using
RouteValuesAddress it needs to have some required values. These details
are a little fiddly, but I think it's worth doing this feature
completely.
2019-04-05 08:31:10 -07:00
Justin Kotalik 010139ac8a
Limit chunk size when writing chunked responses (#8837) 2019-03-29 16:34:26 -07:00
Ryan Nowak 658b37d2bd
Make UseEndpoints a thing (#8765)
* Make endpoint middleware explicit

This change makes the endpoint middleware explicit again, and updates
all of the templates.

The other change here is make UseEndpoints be the place where you
register endpoints. This is vital because it puts your code visually at
the point of the pipeline where it executes.

Lastly, I removed support for UseMvc with endpoint routing. This is
causing issues for some security features, and we're moving in the
direction of trying to make the middleware heavy implementation required
in 3.0. There are some issues we won't be able to fix in MVC if we can't
unambiguously know if UseMvc was used or the middleware.
2019-03-28 15:41:11 -07:00
Ryan Nowak 0dc14a61ce Simplify Map methods 2019-03-13 20:12:53 -07:00
Ryan Nowak 4b4614635f Change template -> pattern for MVC 2019-03-13 20:12:53 -07:00
Ryan Nowak e78a6521b9 Make naming of IEndpointRouteBuilderConsistent across usages. 2019-03-13 20:12:53 -07:00
Chris Ross 6db129a588
Support conditional compression #6925 (#8239) 2019-03-07 11:09:48 -08:00
Ryan Nowak a1ec03e1e6 Add fallback routing for controllers and pages 2019-03-06 09:48:07 -08:00