Fixes xamarin-bug #8646: Inconsistencies with MS.NET on Sys.Web.Routing logic #515

Merged
merged 4 commits into from Nov 30, 2012

Projects

None yet

2 participants

@pruiz
Contributor
pruiz commented Nov 29, 2012

This patch fixes some inconsistencies on Sys.Web.Routing between our implementation
and the one found on MS.NET.. Both relating to URL Generation code inside of
Route.GetVirtualPath().

  1. When defining a route with a parameter with both a default value and some
    constraint, Route.GetVirtualPath() fails to match if no parameter values is specified.

  2. HttpMethodConstraint, does not take into account RouteDirection.UrlGeneration.

See: https://bugzilla.xamarin.com/show_bug.cgi?id=8646
License: This patch is under MIT/X11 license.

pruiz added some commits Nov 29, 2012
@pruiz pruiz Fixes xamarin-bug #8646: Inconsistencies with MS.NET on Sys.Web.Routi…
…ng logic.

This patch fixes some inconsistencies on Sys.Web.Routing between our implementation
and the one found on MS.NET.. Both relating to URL Generation code inside of
Route.GetVirtualPath().

1) When defining a route with a parameter with both a default value and some
constraint, Route.GetVirtualPath() fails to match if no parameter values is specified.

2) HttpMethodConstraint, does not take into account RouteDirection.UrlGeneration.

See: https://bugzilla.xamarin.com/show_bug.cgi?id=8646
License: This patch is under MIT/X11 license.
4c066fa
@pruiz pruiz One line typo bug which passed unoticed on previous commit. 00b8180
@marek-safar
Member

Please update the patch to match Mono coding guidelines

@pruiz
Contributor
pruiz commented Nov 29, 2012

Oh, sorry.. I forgot coding guidelines during my diff review. I'll add another commit fixing another issue found, and then a final one with coding guidelines fixes.

Would you like them all to be squashed into one single commit or is it just fine as independent ones?

pruiz added some commits Nov 29, 2012
@pruiz pruiz Fixed routes with CatchAll argument, in order to make them succesfully
match requests with empty (or null) catch-all portion.

Included a couple of unit-tests which pass both here, and on ms.net land.

License: This patch is under MIT/X11 license.
3ce598d
@pruiz pruiz Fix style to adhere to mono's coding guidelines. 3ab03bc
@pruiz
Contributor
pruiz commented Nov 29, 2012

Here you have, with style fixed, etc.

Please, let me know if there's anything else I am missing or if you need it squashed into one single commit (in such case I will need to create another pull-request and close this one).

@marek-safar marek-safar merged commit 0849155 into mono:master Nov 30, 2012
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment