Remove IsLocal

This commit is contained in:
Brennan 2016-01-19 08:50:17 -08:00
parent 8ff779778c
commit 1cae0695f7
5 changed files with 0 additions and 25 deletions

View File

@ -30,7 +30,6 @@ namespace HelloWorld
// Request // Request
// context.Request.ProtocolVersion // context.Request.ProtocolVersion
// context.Request.IsLocal
// context.Request.Headers // context.Request.Headers
// context.Request.Method // context.Request.Method
// context.Request.Body // context.Request.Body

View File

@ -65,7 +65,6 @@ namespace Microsoft.AspNet.Server.WebListener
private IPAddress _localIpAddress; private IPAddress _localIpAddress;
private int? _remotePort; private int? _remotePort;
private int? _localPort; private int? _localPort;
private bool? _isLocal;
private string _requestId; private string _requestId;
private X509Certificate2 _clientCert; private X509Certificate2 _clientCert;
private ClaimsPrincipal _user; private ClaimsPrincipal _user;
@ -219,19 +218,6 @@ namespace Microsoft.AspNet.Server.WebListener
set { _scheme = value; } set { _scheme = value; }
} }
bool IHttpConnectionFeature.IsLocal
{
get
{
if (_isLocal == null)
{
_isLocal = Request.IsLocal;
}
return _isLocal.Value;
}
set { _isLocal = value; }
}
IPAddress IHttpConnectionFeature.LocalIpAddress IPAddress IHttpConnectionFeature.LocalIpAddress
{ {
get get

View File

@ -294,14 +294,6 @@ namespace Microsoft.Net.Http.Server
get { return _path; } get { return _path; }
} }
public bool IsLocal
{
get
{
return LocalEndPoint.GetIPAddress().Equals(RemoteEndPoint.GetIPAddress());
}
}
public bool IsSecureConnection public bool IsSecureConnection
{ {
get get

View File

@ -59,7 +59,6 @@ namespace Microsoft.AspNet.Server.WebListener
Assert.NotEqual(0, connectionInfo.RemotePort); Assert.NotEqual(0, connectionInfo.RemotePort);
Assert.Equal("::1", connectionInfo.LocalIpAddress.ToString()); Assert.Equal("::1", connectionInfo.LocalIpAddress.ToString());
Assert.NotEqual(0, connectionInfo.LocalPort); Assert.NotEqual(0, connectionInfo.LocalPort);
Assert.True(connectionInfo.IsLocal);
// Trace identifier // Trace identifier
var requestIdentifierFeature = httpContext.Features.Get<IHttpRequestIdentifierFeature>(); var requestIdentifierFeature = httpContext.Features.Get<IHttpRequestIdentifierFeature>();

View File

@ -39,7 +39,6 @@ namespace Microsoft.Net.Http.Server
Assert.NotEqual(0, request.RemotePort); Assert.NotEqual(0, request.RemotePort);
Assert.Equal("::1", request.LocalIpAddress.ToString()); Assert.Equal("::1", request.LocalIpAddress.ToString());
Assert.NotEqual(0, request.LocalPort); Assert.NotEqual(0, request.LocalPort);
Assert.True(request.IsLocal);
// Note: Response keys are validated in the ResponseTests // Note: Response keys are validated in the ResponseTests