2009-11-23 Marek Habersack <mhabersack@novell.com>
authorMarek Habersack <grendel@twistedcode.net>
Mon, 23 Nov 2009 16:24:04 +0000 (16:24 -0000)
committerMarek Habersack <grendel@twistedcode.net>
Mon, 23 Nov 2009 16:24:04 +0000 (16:24 -0000)
* HttpRequest.cs: PathInfo returns an empty string when worker
request is absent or its GetPathInfo method returns a null. Patch
from Tiaan <tagdev@gmail.com>, thanks!

2009-11-23  Marek Habersack  <mhabersack@novell.com>

* Route.cs: GetRouteData throws NotImplementedException only when
pathInfo for the current request is a non-empty string. Patch from
Tiaan <tagdev@gmail.com>, thanks!

svn path=/trunk/mcs/; revision=146732

mcs/class/System.Web.Routing/System.Web.Routing/ChangeLog
mcs/class/System.Web.Routing/System.Web.Routing/Route.cs
mcs/class/System.Web/System.Web/ChangeLog
mcs/class/System.Web/System.Web/HttpRequest.cs

index 033357c40ba4294a1023b6005784b4ca02eda220..5f16009ed9a89d64b046a5e7ec7a33eb530ce6a7 100644 (file)
@@ -1,3 +1,9 @@
+2009-11-23  Marek Habersack  <mhabersack@novell.com>
+
+       * Route.cs: GetRouteData throws NotImplementedException only when
+       pathInfo for the current request is a non-empty string. Patch from
+       Tiaan <tagdev@gmail.com>, thanks!
+
 2009-11-09  Marek Habersack  <mhabersack@novell.com>
 
        * RouteCollection.cs: GetVirtualPath doesn't append trailing slash
index e9c479321858cdeee7c2822b98cc4dc086a7ebab..182120aa36681d3fd55dcd0740f1d0bf9fd34018 100644 (file)
@@ -86,7 +86,7 @@ namespace System.Web.Routing
                        var path = httpContext.Request.AppRelativeCurrentExecutionFilePath;
                        var pathInfo = httpContext.Request.PathInfo;
 
-                       if (pathInfo != String.Empty)
+                       if (!String.IsNullOrEmpty (pathInfo))
                                throw new NotImplementedException ();
 
                        // probably code like this causes ArgumentOutOfRangeException under .NET.
index fd1f63d8e6b9b427f72c26c00d8265a4b88f6155..8a49fe3116c0c8d739a8d65f471796fe1f20af86 100644 (file)
@@ -1,3 +1,9 @@
+2009-11-23  Marek Habersack  <mhabersack@novell.com>
+
+       * HttpRequest.cs: PathInfo returns an empty string when worker
+       request is absent or its GetPathInfo method returns a null. Patch
+       from Tiaan <tagdev@gmail.com>, thanks!
+
 2009-11-19  Marek Habersack  <mhabersack@novell.com>
 
        * VirtualPathUtility.cs: made Normalize internal
index e1886c05af1e34a86f1930220d72a3aed27fcac9..b28ce183b56e1ab46cc95d96a00c3c684574e874 100644 (file)
@@ -942,7 +942,7 @@ namespace System.Web
                                if (path_info == null) {
                                        if (worker_request == null)
                                                return String.Empty;
-                                       path_info = worker_request.GetPathInfo ();
+                                       path_info = worker_request.GetPathInfo () ?? String.Empty;
                                }
 
                                return path_info;