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

Commit 65ebf41

Browse files
committed
Removed IsLocal from ConnectionInfo
1 parent 129a5ad commit 65ebf41

File tree

4 files changed

+1
-15
lines changed

4 files changed

+1
-15
lines changed

samples/SampleApp/Startup.cs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,6 @@ public void Configure(IApplicationBuilder app, ILoggerFactory loggerFactory, IAp
5555
var connectionFeature = context.Connection;
5656
Console.WriteLine($"Peer: {connectionFeature.RemoteIpAddress?.ToString()} {connectionFeature.RemotePort}");
5757
Console.WriteLine($"Sock: {connectionFeature.LocalIpAddress?.ToString()} {connectionFeature.LocalPort}");
58-
Console.WriteLine($"IsLocal: {connectionFeature.IsLocal}");
5958

6059
context.Response.ContentLength = 11;
6160
context.Response.ContentType = "text/plain";

src/Microsoft.AspNet.Server.Kestrel/Http/Frame.FeatureCollection.cs

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -272,8 +272,6 @@ bool IHttpUpgradeFeature.IsUpgradableRequest
272272

273273
int IHttpConnectionFeature.LocalPort { get; set; }
274274

275-
bool IHttpConnectionFeature.IsLocal { get; set; }
276-
277275
object IFeatureCollection.this[Type key]
278276
{
279277
get { return FastFeatureGet(key); }

src/Microsoft.AspNet.Server.Kestrel/Http/Frame.cs

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -233,15 +233,6 @@ public void Reset()
233233
httpConnectionFeature.LocalIpAddress = _localEndPoint?.Address;
234234
httpConnectionFeature.LocalPort = _localEndPoint?.Port ?? 0;
235235

236-
if (_remoteEndPoint != null && _localEndPoint != null)
237-
{
238-
httpConnectionFeature.IsLocal = _remoteEndPoint.Address.Equals(_localEndPoint.Address);
239-
}
240-
else
241-
{
242-
httpConnectionFeature.IsLocal = false;
243-
}
244-
245236
_prepareRequest?.Invoke(this);
246237

247238
_manuallySetRequestAbortToken = null;

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

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -145,8 +145,7 @@ await context.Response.WriteAsync(JsonConvert.SerializeObject(new
145145
RemoteIPAddress = connection.RemoteIpAddress?.ToString(),
146146
RemotePort = connection.RemotePort,
147147
LocalIPAddress = connection.LocalIpAddress?.ToString(),
148-
LocalPort = connection.LocalPort,
149-
IsLocal = connection.IsLocal
148+
LocalPort = connection.LocalPort
150149
}));
151150
});
152151
});
@@ -165,7 +164,6 @@ await context.Response.WriteAsync(JsonConvert.SerializeObject(new
165164
var facts = JsonConvert.DeserializeObject<JObject>(connectionFacts);
166165
Assert.Equal(expectAddress, facts["RemoteIPAddress"].Value<string>());
167166
Assert.NotEmpty(facts["RemotePort"].Value<string>());
168-
Assert.True(facts["IsLocal"].Value<bool>());
169167
}
170168
}
171169
}

0 commit comments

Comments
 (0)