Removed IsLocal from ConnectionInfo
This commit is contained in:
parent
9885377148
commit
63cd6149d1
|
|
@ -54,7 +54,6 @@ namespace SampleApp
|
|||
var connectionFeature = context.Connection;
|
||||
Console.WriteLine($"Peer: {connectionFeature.RemoteIpAddress?.ToString()} {connectionFeature.RemotePort}");
|
||||
Console.WriteLine($"Sock: {connectionFeature.LocalIpAddress?.ToString()} {connectionFeature.LocalPort}");
|
||||
Console.WriteLine($"IsLocal: {connectionFeature.IsLocal}");
|
||||
|
||||
context.Response.ContentLength = 11;
|
||||
context.Response.ContentType = "text/plain";
|
||||
|
|
|
|||
|
|
@ -272,8 +272,6 @@ namespace Microsoft.AspNet.Server.Kestrel.Http
|
|||
|
||||
int IHttpConnectionFeature.LocalPort { get; set; }
|
||||
|
||||
bool IHttpConnectionFeature.IsLocal { get; set; }
|
||||
|
||||
object IFeatureCollection.this[Type key]
|
||||
{
|
||||
get { return FastFeatureGet(key); }
|
||||
|
|
|
|||
|
|
@ -233,15 +233,6 @@ namespace Microsoft.AspNet.Server.Kestrel.Http
|
|||
httpConnectionFeature.LocalIpAddress = _localEndPoint?.Address;
|
||||
httpConnectionFeature.LocalPort = _localEndPoint?.Port ?? 0;
|
||||
|
||||
if (_remoteEndPoint != null && _localEndPoint != null)
|
||||
{
|
||||
httpConnectionFeature.IsLocal = _remoteEndPoint.Address.Equals(_localEndPoint.Address);
|
||||
}
|
||||
else
|
||||
{
|
||||
httpConnectionFeature.IsLocal = false;
|
||||
}
|
||||
|
||||
_prepareRequest?.Invoke(this);
|
||||
|
||||
_manuallySetRequestAbortToken = null;
|
||||
|
|
|
|||
|
|
@ -145,8 +145,7 @@ namespace Microsoft.AspNet.Server.Kestrel.FunctionalTests
|
|||
RemoteIPAddress = connection.RemoteIpAddress?.ToString(),
|
||||
RemotePort = connection.RemotePort,
|
||||
LocalIPAddress = connection.LocalIpAddress?.ToString(),
|
||||
LocalPort = connection.LocalPort,
|
||||
IsLocal = connection.IsLocal
|
||||
LocalPort = connection.LocalPort
|
||||
}));
|
||||
});
|
||||
});
|
||||
|
|
@ -165,7 +164,6 @@ namespace Microsoft.AspNet.Server.Kestrel.FunctionalTests
|
|||
var facts = JsonConvert.DeserializeObject<JObject>(connectionFacts);
|
||||
Assert.Equal(expectAddress, facts["RemoteIPAddress"].Value<string>());
|
||||
Assert.NotEmpty(facts["RemotePort"].Value<string>());
|
||||
Assert.True(facts["IsLocal"].Value<bool>());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue