From 2dad620baa97406bd71ce2c308cb1f0fbfabb0c2 Mon Sep 17 00:00:00 2001 From: Gonzalo Paniagua Javier Date: Sat, 30 Apr 2011 11:33:00 +0200 Subject: [PATCH] Fix prefix selection We were picking the wrong prefix when the URL matched the path. Fixes bug #688860. --- mcs/class/System/System.Net/ListenerPrefix.cs | 2 ++ 1 file changed, 2 insertions(+) diff --git a/mcs/class/System/System.Net/ListenerPrefix.cs b/mcs/class/System/System.Net/ListenerPrefix.cs index 7a6f6a87777..146ee4024a2 100644 --- a/mcs/class/System/System.Net/ListenerPrefix.cs +++ b/mcs/class/System/System.Net/ListenerPrefix.cs @@ -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) -- 2.25.1