[Modify] Use it

This commit is contained in:
sta 2016-10-05 15:26:21 +09:00
parent 077b5d3063
commit 215574b9ab

View File

@ -630,13 +630,10 @@ namespace WebSocketSharp.Server
return;
}
if (_dnsStyle) {
var hostname = uri.DnsSafeHost;
if (Uri.CheckHostName (hostname) == UriHostNameType.Dns && hostname != _hostname) {
if (!checkHostName (uri.DnsSafeHost)) {
context.Close (HttpStatusCode.NotFound);
return;
}
}
WebSocketServiceHost host;
if (!_services.InternalTryGetServiceHost (uri.AbsolutePath, out host)) {