Fix prefix selection
authorGonzalo Paniagua Javier <gonzalo.mono@gmail.com>
Sat, 30 Apr 2011 09:33:00 +0000 (11:33 +0200)
committerGonzalo Paniagua Javier <gonzalo.mono@gmail.com>
Sat, 30 Apr 2011 09:33:00 +0000 (11:33 +0200)
We were picking the wrong prefix when the URL matched the path.
Fixes bug #688860.

mcs/class/System/System.Net/ListenerPrefix.cs

index 7a6f6a87777f2a2dde04b60c3975d96587cd7e1f..146ee4024a2165e78a4654b76603fd11ce2b1200 100644 (file)
@@ -111,6 +111,8 @@ namespace System.Net {
                                host = uri.Substring (start_host, root - start_host);
                                path = uri.Substring (root);
                        }
+                       if (path.Length != 1)
+                               path = path.Substring (0, path.Length - 1);
                }
 
                public static void CheckUri (string uri)