diff --git a/samples/HelloWorld/Program.cs b/samples/HelloWorld/Program.cs index 2f62f08..7b54580 100644 --- a/samples/HelloWorld/Program.cs +++ b/samples/HelloWorld/Program.cs @@ -30,7 +30,6 @@ public static async Task Main(string[] args) // Request // context.Request.ProtocolVersion - // context.Request.IsLocal // context.Request.Headers // context.Request.Method // context.Request.Body diff --git a/src/Microsoft.AspNet.Server.WebListener/FeatureContext.cs b/src/Microsoft.AspNet.Server.WebListener/FeatureContext.cs index e311ebf..a74869f 100644 --- a/src/Microsoft.AspNet.Server.WebListener/FeatureContext.cs +++ b/src/Microsoft.AspNet.Server.WebListener/FeatureContext.cs @@ -65,7 +65,6 @@ internal class FeatureContext : private IPAddress _localIpAddress; private int? _remotePort; private int? _localPort; - private bool? _isLocal; private string _requestId; private X509Certificate2 _clientCert; private ClaimsPrincipal _user; @@ -219,19 +218,6 @@ string IHttpRequestFeature.Scheme set { _scheme = value; } } - bool IHttpConnectionFeature.IsLocal - { - get - { - if (_isLocal == null) - { - _isLocal = Request.IsLocal; - } - return _isLocal.Value; - } - set { _isLocal = value; } - } - IPAddress IHttpConnectionFeature.LocalIpAddress { get diff --git a/src/Microsoft.Net.Http.Server/RequestProcessing/Request.cs b/src/Microsoft.Net.Http.Server/RequestProcessing/Request.cs index 67fd440..5ffebdf 100644 --- a/src/Microsoft.Net.Http.Server/RequestProcessing/Request.cs +++ b/src/Microsoft.Net.Http.Server/RequestProcessing/Request.cs @@ -294,14 +294,6 @@ public string Path get { return _path; } } - public bool IsLocal - { - get - { - return LocalEndPoint.GetIPAddress().Equals(RemoteEndPoint.GetIPAddress()); - } - } - public bool IsSecureConnection { get diff --git a/test/Microsoft.AspNet.Server.WebListener.FunctionalTests/RequestTests.cs b/test/Microsoft.AspNet.Server.WebListener.FunctionalTests/RequestTests.cs index 8227c2d..1677710 100644 --- a/test/Microsoft.AspNet.Server.WebListener.FunctionalTests/RequestTests.cs +++ b/test/Microsoft.AspNet.Server.WebListener.FunctionalTests/RequestTests.cs @@ -59,7 +59,6 @@ public async Task Request_SimpleGet_Success() Assert.NotEqual(0, connectionInfo.RemotePort); Assert.Equal("::1", connectionInfo.LocalIpAddress.ToString()); Assert.NotEqual(0, connectionInfo.LocalPort); - Assert.True(connectionInfo.IsLocal); // Trace identifier var requestIdentifierFeature = httpContext.Features.Get(); diff --git a/test/Microsoft.Net.Http.Server.FunctionalTests/RequestTests.cs b/test/Microsoft.Net.Http.Server.FunctionalTests/RequestTests.cs index 6416750..ac7b14d 100644 --- a/test/Microsoft.Net.Http.Server.FunctionalTests/RequestTests.cs +++ b/test/Microsoft.Net.Http.Server.FunctionalTests/RequestTests.cs @@ -39,7 +39,6 @@ public async Task Request_SimpleGet_Success() Assert.NotEqual(0, request.RemotePort); Assert.Equal("::1", request.LocalIpAddress.ToString()); Assert.NotEqual(0, request.LocalPort); - Assert.True(request.IsLocal); // Note: Response keys are validated in the ResponseTests