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

Commit 1cae069

Browse files
committed
Remove IsLocal
1 parent 8ff7797 commit 1cae069

File tree

5 files changed

+0
-25
lines changed

5 files changed

+0
-25
lines changed

samples/HelloWorld/Program.cs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,6 @@ public static async Task Main(string[] args)
3030

3131
// Request
3232
// context.Request.ProtocolVersion
33-
// context.Request.IsLocal
3433
// context.Request.Headers
3534
// context.Request.Method
3635
// context.Request.Body

src/Microsoft.AspNet.Server.WebListener/FeatureContext.cs

Lines changed: 0 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,6 @@ internal class FeatureContext :
6565
private IPAddress _localIpAddress;
6666
private int? _remotePort;
6767
private int? _localPort;
68-
private bool? _isLocal;
6968
private string _requestId;
7069
private X509Certificate2 _clientCert;
7170
private ClaimsPrincipal _user;
@@ -219,19 +218,6 @@ string IHttpRequestFeature.Scheme
219218
set { _scheme = value; }
220219
}
221220

222-
bool IHttpConnectionFeature.IsLocal
223-
{
224-
get
225-
{
226-
if (_isLocal == null)
227-
{
228-
_isLocal = Request.IsLocal;
229-
}
230-
return _isLocal.Value;
231-
}
232-
set { _isLocal = value; }
233-
}
234-
235221
IPAddress IHttpConnectionFeature.LocalIpAddress
236222
{
237223
get

src/Microsoft.Net.Http.Server/RequestProcessing/Request.cs

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -294,14 +294,6 @@ public string Path
294294
get { return _path; }
295295
}
296296

297-
public bool IsLocal
298-
{
299-
get
300-
{
301-
return LocalEndPoint.GetIPAddress().Equals(RemoteEndPoint.GetIPAddress());
302-
}
303-
}
304-
305297
public bool IsSecureConnection
306298
{
307299
get

test/Microsoft.AspNet.Server.WebListener.FunctionalTests/RequestTests.cs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,6 @@ public async Task Request_SimpleGet_Success()
5959
Assert.NotEqual(0, connectionInfo.RemotePort);
6060
Assert.Equal("::1", connectionInfo.LocalIpAddress.ToString());
6161
Assert.NotEqual(0, connectionInfo.LocalPort);
62-
Assert.True(connectionInfo.IsLocal);
6362

6463
// Trace identifier
6564
var requestIdentifierFeature = httpContext.Features.Get<IHttpRequestIdentifierFeature>();

test/Microsoft.Net.Http.Server.FunctionalTests/RequestTests.cs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,6 @@ public async Task Request_SimpleGet_Success()
3939
Assert.NotEqual(0, request.RemotePort);
4040
Assert.Equal("::1", request.LocalIpAddress.ToString());
4141
Assert.NotEqual(0, request.LocalPort);
42-
Assert.True(request.IsLocal);
4342

4443
// Note: Response keys are validated in the ResponseTests
4544

0 commit comments

Comments
 (0)