mccalltd / AttributeRouting

Define your routes using attributes on actions in ASP.NET MVC and Web API.
http://mccalltd.github.io/AttributeRouting/
MIT License
416 stars 89 forks source link

Fix #241. Ignore virtual path prefix of request URL when checking route. #244

Closed CaptainCodeman closed 11 years ago

CaptainCodeman commented 11 years ago

Ignore virtual path prefix of request URL when performing optimized checking of static left part of route.

Enables a virtual path to be used after the port for self-hosted WebAPI so that multiple apps can bind to the same port. e.g.

var config = new HttpSelfHostConfiguration("http://localhost:8080/root")

Previously, the virtual path was ignored when performing the short-circuit check of the request URL against the route which meant routes that should have matched didn't and returned 404.

mccalltd commented 11 years ago

Hey Cap'n,

Do you have a unit test for this? Otherwise seems good to me.

Cheers,

Tim

CaptainCodeman commented 11 years ago

No problem, I'll add something tomorrow.

Simon

CaptainCodeman commented 11 years ago

Let me know what you think and BTW, thanks for a great library!

Cheers Simon