Skip to content
This repository was archived by the owner on Mar 19, 2019. It is now read-only.

Remove IsLocal #174

Merged
merged 1 commit into from
Jan 19, 2016
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion samples/HelloWorld/Program.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
14 changes: 0 additions & 14 deletions src/Microsoft.AspNet.Server.WebListener/FeatureContext.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -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
Expand Down
8 changes: 0 additions & 8 deletions src/Microsoft.Net.Http.Server/RequestProcessing/Request.cs
Original file line number Diff line number Diff line change
Expand Up @@ -294,14 +294,6 @@ public string Path
get { return _path; }
}

public bool IsLocal
{
get
{
return LocalEndPoint.GetIPAddress().Equals(RemoteEndPoint.GetIPAddress());
}
}

public bool IsSecureConnection
{
get
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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<IHttpRequestIdentifierFeature>();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down