[System] Fixes HttpListenerRequest.IsLocal.
authorMarcos Henrich <marcos.henrich@xamarin.com>
Mon, 22 Feb 2016 15:44:34 +0000 (15:44 +0000)
committerMarcos Henrich <marcos.henrich@xamarin.com>
Mon, 22 Feb 2016 15:44:34 +0000 (15:44 +0000)
IsLocal was only returning true when the loopback address was used.
Fixes #38322.

mcs/class/System/System.Net/HttpListenerRequest.cs

index 769195a2b3ec4c965278d9ed8aa7670388d5e800..f1c47802cb94bef9e16534919ff1d10aba148b8c 100644 (file)
@@ -403,7 +403,7 @@ namespace System.Net {
                }
 
                public bool IsLocal {
-                       get { return IPAddress.IsLoopback (RemoteEndPoint.Address); }
+                       get { return LocalEndPoint.Address.Equals (RemoteEndPoint.Address); }
                }
 
                public bool IsSecureConnection {