Skip to content

Commit

Permalink
Backport of r145740
Browse files Browse the repository at this point in the history
svn path=/branches/mono-2-4/mcs/; revision=145742
  • Loading branch information
grendello committed Nov 9, 2009
1 parent bf91b20 commit bcba7f1
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 1 deletion.
5 changes: 5 additions & 0 deletions mcs/class/System.Web.Routing/System.Web.Routing/ChangeLog
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
2009-11-09 Marek Habersack <mhabersack@novell.com>

* RouteCollection.cs: GetVirtualPath doesn't append trailing slash
to application path blindly anymore. Fixes bug #553022

2009-09-09 Marek Habersack <mhabersack@novell.com>

* Route.cs: when Url is set to null, create a parser for empty
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -163,7 +163,11 @@ public VirtualPathData GetVirtualPath (RequestContext requestContext, string nam
}

if (vp != null) {
var pathWithApp = String.Concat (requestContext.HttpContext.Request.ApplicationPath, "/", vp.VirtualPath);
string appPath = requestContext.HttpContext.Request.ApplicationPath;
if (appPath != null && (appPath.Length == 0 || !appPath.EndsWith ("/", StringComparison.Ordinal)))
appPath += "/";

string pathWithApp = String.Concat (appPath, vp.VirtualPath);
vp.VirtualPath = requestContext.HttpContext.Response.ApplyAppPathModifier (pathWithApp);
return vp;
}
Expand Down

0 comments on commit bcba7f1

Please sign in to comment.