[Modify] Polish it

master
sta 5 years ago
parent 571db9f76a
commit 747361a86f

@ -914,18 +914,23 @@ namespace WebSocketSharp.Server
private void processRequest (HttpListenerWebSocketContext context)
{
var uri = context.RequestUri;
if (uri == null) {
context.Close (HttpStatusCode.BadRequest);
return;
}
var path = uri.AbsolutePath;
if (path.IndexOfAny (new[] { '%', '+' }) > -1)
path = HttpUtility.UrlDecode (path, Encoding.UTF8);
WebSocketServiceHost host;
if (!_services.InternalTryGetServiceHost (path, out host)) {
context.Close (HttpStatusCode.NotImplemented);
return;
}

Loading…
Cancel
Save