Commit Graph

114 Commits

Author SHA1 Message Date
Kiran Challa 1196349bf4 [Fixes #583] Handle change events in RouteValueBaseEndpointFinder 2018-07-17 05:54:11 -07:00
Kiran Challa aed2e24483 Allow to pass in HttpContext when generating links 2018-07-17 05:16:57 -07:00
Ryan Nowak 02e1d78319 Minor fixes for MatchProcessorFactory
Fixing minor issues found doing DFA integration.
2018-07-16 21:06:35 -07:00
Ryan Nowak 5f29e8b062 Hoist path out of loop in BarebonesMatcher
This is an oopsie from a previous change.
2018-07-16 20:43:31 -07:00
Ryan Nowak b2e4743c7d
Change benchmarks (#612)
Add benchmarks that include some HTTP method matching.

Clean up names and name like-kinded benchmarks alphabetically.

Matcher*Benchmark -> E2E including HTTP method selection
MatcherSelectCandidates*Benchmark -> Focused on just URL path processing
2018-07-14 17:21:05 -07:00
James Newton-King 497a38035d
Add application startup check that dispatcher is added to request pipeline (#614) 2018-07-15 11:50:55 +12:00
James Newton-King 73e4d55d7b
Check dispatcher services registered (#610) 2018-07-14 18:20:42 +12:00
Ryan Nowak 9e114b547d
Introduce RoutePattern (#585)
* Introduce RoutePattern

Introduces RoutePattern - a new parser and representation for routing
templates, defaults, and constraints.

This is a new representation for all of the 'inputs' to routing that is
immutable and captures 'out of line' information for defaults and
constraints.

This will allow us to unify the handling of constraints and values from
attribute style routes and conventional style routes.
2018-07-13 18:01:46 -07:00
Kiran Challa 42708bec91 Added support for route constraints in Dispatcher world 2018-07-13 14:18:54 -07:00
Kiran Challa 1c7f53ae39 Fix TemplateBinder to consider null and empty string values the same 2018-07-13 10:21:55 -07:00
Ryan Nowak 7209cab5e9
Productize JumpTable (#594)
* Productize JumpTable
2018-07-12 23:28:51 -07:00
James Newton-King 0cf972cc43
Error message on no dispatcher middleware in endpoint middleware (#600) 2018-07-13 10:16:21 +12:00
Kiran Challa 3a022107dc Revert "Added support for route constraints in Dispatcher world"
This reverts commit 85e92ab3cc.
2018-07-12 06:24:37 -07:00
Nate McMaster 85e92ab3cc Added support for route constraints in Dispatcher world 2018-07-12 05:06:22 -07:00
Ryan Nowak 576c14a1b5 Remove InstructionMatcher 2018-07-11 23:47:57 -07:00
Kiran Challa 1009705283 Added a RouteValuesBasedEndpointFinder 2018-06-28 10:53:10 -07:00
Ryan Nowak 30fcfb65ea Productionize Path tokenization 2018-06-21 17:13:03 -07:00
James Newton-King 6efd679ce3
Fix TreeMatcher with route constraints (#576) 2018-06-22 10:33:44 +12:00
Ryan Nowak db95a8c624 Add more matcher tests
This is a code dump of existing tests for TemplateMatcher and TreeRouter
converted to the format of matcher conformance tests.

Note that most of the new tests aren't yet supported by our experimental
matchers, which don't support many of these advanced features.
2018-06-20 10:39:53 -07:00
Ryan Nowak 5b8db03a57 Fixing up a few small issues
The instruction matcher was missing a few details, which made it faster
than it should have been. Right now I'm trying to keep the design of
these in sync. Once I fixed that it exposed a legitimate bug that was
blocking the github benchmark.
2018-06-15 18:04:43 -07:00
Ryan Nowak 00e99dbbb2 Flesh out experimental matchers
This change improves this area a bit by consolidating the matcher
implementations between the benchmarks project and the conformance
tests.

Additionally I split the minimal matcher into a really trivial
implementation for the simple tests and a more complex one for the
larger tests. This allows us to keep the plaintext/techempower scenario
in sight while also having a good baseline for the more sophisticated
tests.

Also starting to add tests that verify that matchers behave as expected.

The matchers now successfully execute all of these benchmarks, which
means that they support literals and parameters.

Missing features:
- complex segments
- catchall
- default values
- optional parameters
- constraints
- complex segments with file extensions

This is a good place to iterate a bit more of perf and try to make a
decision about what we want to implement.
2018-06-15 15:43:50 -07:00
Kiran Challa d3ddc1709a Added initial support for link generation when using Dispatcher 2018-06-14 15:31:30 -07:00
James Newton-King 9efa7665c9
Fix endpoint constraint cache (#555) 2018-06-13 16:40:06 +12:00
James Newton-King 28d1bc4fa2
Fix TreeMatcher's use of EndpointSelector (#551) 2018-06-12 15:47:34 +12:00
James Newton-King 84bc8351c9
Initial endpoint constraints functionality (#548) 2018-06-12 09:43:17 +12:00
Ryan Nowak 08f12f2bfd Add sample matcher tests 2018-06-09 13:29:06 -07:00
James Newton-King 1b470f3d3b
Fix Endpoint order in TreeMatcher (#542) 2018-06-08 16:19:56 +12:00
James Newton-King 21f8ce5e95
Initial DispatcherMiddleware tests (#529) 2018-06-07 21:47:06 +12:00
kishan.anem acea87a617 IUrlHelper and support for RouteOptions.LowercaseUrls
changes are made as suggestions.
@rynowak
#518
#Issue:  aspnet/Mvc#7720
2018-05-31 20:07:01 -07:00
kishan.anem cb77c17cf4 TestCase added and IUrlHelper and support for RouteOptions.LowercaseUrls
checked appliesd to the query string.
@rynowak
#518
#Issue:  aspnet/Mvc#7720
2018-05-31 20:07:01 -07:00
Kiran Challa 39f7420c4d Fixed routing test 2018-04-13 11:51:45 -07:00
= 7113e54267 Update usage of TestSink 2018-04-12 16:17:04 -07:00
Kiran Challa 4184b2406d Updated to make routing always use UrlEncoder.Default and not depend on DI to get it.
[Fixes #513] RedirectToAction with Non-English Characters in Parameters and Authentication Causes Error
2018-04-12 05:15:45 -07:00
Jass Bagga 57697baedb
Tolerate leading "~/" or "/" (#509) 2018-01-11 13:00:01 -08:00
Jass Bagga 93d20ec78c
Revert Dispatcher changes (#508)
Addresses aspnet/Home#2741
2018-01-10 12:53:17 -08:00
Jass Bagga 54e96bd404
Tolerate leading "~/" or "/" (#499)
Addresses #441
2017-11-21 14:20:17 -08:00
Pranav K b67c63927c Update samples and tests to target netcoreapp2.1 2017-11-13 16:45:38 -08:00
Nate McMaster f4fb178f55 Pin tool and package versions to make builds more repeatable
Part of aspnet/Universe#575
2017-11-01 16:32:09 -07:00
Ryan Nowak 736b49294d Add Template abstraction
This change adds the Template as a top level abstraction. URL templating
is now a two-stage process.

First you use a 'key' to look up a Template, then you use the Template
to create the URL.

This change also has some cleanup of the way RoutePatternBinder gets
instantiated. I added a factory service so that most of the complex
things can be made internal to Dispatcher. Now it's much easier to
constuct and use. These impacts some pubternal APIs that we already
broke, but makes them actually nice :)

Also cleaned up some tests and fixed one that was broken and not
running.
2017-10-25 22:15:24 -07:00
Ryan Nowak 2d661396df Port TemplateBinder to dispatcher 2017-10-25 14:28:20 -07:00
Jass Bagga eebc7db2ca Use RoutePatternMatcher logic in TemplateMatcher (#484) 2017-10-25 14:16:04 -07:00
Ryan Nowak bd517f891f Support conversions from RouteTemplate -> RoutePattern 2017-10-20 16:58:14 -07:00
Jass Bagga fdc5f21428 Port PathTokenizer (#478) 2017-10-20 13:24:00 -07:00
Ryan Nowak 08a64048da Redesign public API for templates
-Renamed RouteTemplate -> RoutePattern
-Made immutable
-Added Builder
-Lots of fixes to parser to support new design

There are a few small issues logged for follow-up but this is mostly in
the place I want it design-wise.
2017-10-19 09:41:45 -07:00
Jass Bagga 3a5cd6dd25 Port TemplateParser to Dispatcher project (#473)
Addresses #466
2017-10-17 11:52:26 -07:00
Nate McMaster 6b3d42f6bd Minor changes to test code to resolve xUnit2013 build errors 2017-10-05 15:26:36 -07:00
Nate McMaster e67d85d30c Use PackageLineup to manage PackageReference versions 2017-08-29 11:31:54 -07:00
Nate McMaster 44f9a7083b Use Directory.Build.props/targets 2017-08-29 11:30:03 -07:00
Nate McMaster 248f15dee1 Upgrade to xunit 2.3.0-beta4
Includes some changes as required by the new analyzers in this upgrade
2017-08-22 17:49:54 -07:00
Joonas Westlin a18f59ab88 Changed expected exception message to the one defined in Resources.resx.
Removed the Debug.Assert as that caused the test runner to crash as in
this case the preceding part is not a literal.
Fixes the test runner crash.
2017-05-24 08:23:20 -07:00