[Modify] Polish them

This commit is contained in:
sta
2018-04-27 19:21:56 +09:00
parent 1af3b26cb9
commit c0398c5bc1
2 changed files with 6 additions and 14 deletions

View File

@@ -806,6 +806,11 @@ namespace WebSocketSharp.Server
private void processRequest (TcpListenerWebSocketContext context)
{
if (!authenticateClient (context)) {
context.Close (HttpStatusCode.Forbidden);
return;
}
var uri = context.RequestUri;
if (uri == null) {
context.Close (HttpStatusCode.BadRequest);
@@ -846,9 +851,6 @@ namespace WebSocketSharp.Server
cl, null, _secure, _sslConfigInUse, _log
);
if (!ctx.Authenticate (_authSchemes, _realmInUse, _userCredFinder))
return;
processRequest (ctx);
}
catch (Exception ex) {