Skip to content
This repository was archived by the owner on Dec 18, 2018. It is now read-only.

Removed IsLocal from ConnectionInfo #583

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/SampleApp/Startup.cs
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,6 @@ public void Configure(IApplicationBuilder app, ILoggerFactory loggerFactory, IAp
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";
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -272,8 +272,6 @@ bool IHttpUpgradeFeature.IsUpgradableRequest

int IHttpConnectionFeature.LocalPort { get; set; }

bool IHttpConnectionFeature.IsLocal { get; set; }

object IFeatureCollection.this[Type key]
{
get { return FastFeatureGet(key); }
Expand Down
9 changes: 0 additions & 9 deletions src/Microsoft.AspNet.Server.Kestrel/Http/Frame.cs
Original file line number Diff line number Diff line change
Expand Up @@ -233,15 +233,6 @@ public void Reset()
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;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -145,8 +145,7 @@ await context.Response.WriteAsync(JsonConvert.SerializeObject(new
RemoteIPAddress = connection.RemoteIpAddress?.ToString(),
RemotePort = connection.RemotePort,
LocalIPAddress = connection.LocalIpAddress?.ToString(),
LocalPort = connection.LocalPort,
IsLocal = connection.IsLocal
LocalPort = connection.LocalPort
}));
});
});
Expand All @@ -165,7 +164,6 @@ await context.Response.WriteAsync(JsonConvert.SerializeObject(new
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>());
}
}
}
Expand Down