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:<br /><br />1. You want to customize GetRouteData and GetVirtualPath, so you create a specialized IHttpRoute, eg. MyHttpRoute<br />2. You add MyHttpRoute to GlobalConfiguration.Configuration.Routes, which adds a HttpWebRoute that wraps MyHttpRoute to RouteTable.Routes<br />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<br /><br />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.<br /><br />HttpWebRoute should be an adapter for MyHttpRoute, just like HostedHttpRoute is an adapter for HttpWebRoute.<br /><br />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>