Quantcast
Channel: ASPNETWebStack Issue Tracker Rss Feed
Viewing all articles
Browse latest Browse all 7215

Edited Issue: HttpWebRoute should override GetRouteData and GetVirtualPath and call them on HttpRoute [510]

$
0
0
There's nothing wrong with HttpWebRoute when you call MapHttpRoute. The scenario I'm talking about is the following:

1. You want to customize GetRouteData and GetVirtualPath, so you create a specialized IHttpRoute, eg. MyHttpRoute
2. You add MyHttpRoute to GlobalConfiguration.Configuration.Routes, which adds a HttpWebRoute that wraps MyHttpRoute to RouteTable.Routes
3. Calls to HttpWebRoute.GetRouteData or HttpWebRoute.GetVirtualPath do not call the same method on the wrapped MyHttpRoute, so the custom behaviour is not executed

Of course, this should be the case only when HttpWebRoute wraps an instance that is not HostedHttpRoute, because HostedHttpRoute wraps HttpWebRoute, which would result in an infinite loop.

HttpWebRoute should be an adapter for MyHttpRoute, just like HostedHttpRoute is an adapter for HttpWebRoute.

Makes sense?

Viewing all articles
Browse latest Browse all 7215

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>