From 07211d3ad6621ee28fc1ee8b91b329a45be60ea7 Mon Sep 17 00:00:00 2001 From: sta Date: Thu, 3 Nov 2016 15:59:35 +0900 Subject: [PATCH] [Modify] Add it --- websocket-sharp/Server/WebSocketServer.cs | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) diff --git a/websocket-sharp/Server/WebSocketServer.cs b/websocket-sharp/Server/WebSocketServer.cs index c6be71d1..227e593f 100644 --- a/websocket-sharp/Server/WebSocketServer.cs +++ b/websocket-sharp/Server/WebSocketServer.cs @@ -675,6 +675,28 @@ namespace WebSocketSharp.Server return true; } + private bool checkServicePath (string path, out string message) + { + message = null; + + if (path.IsNullOrEmpty ()) { + message = "'path' is null or empty."; + return false; + } + + if (path[0] != '/') { + message = "'path' is not an absolute path."; + return false; + } + + if (path.IndexOfAny (new[] { '?', '#' }) > -1) { + message = "'path' includes either or both query and fragment components."; + return false; + } + + return true; + } + private bool checkSslConfiguration ( ServerSslConfiguration configuration, out string message )