From 9ac578fa0e5aaec1650df21279cb7f93a3123836 Mon Sep 17 00:00:00 2001 From: sta Date: Thu, 10 Dec 2020 19:45:43 +0900 Subject: [PATCH] [Modify] Add it --- websocket-sharp/Net/HttpListenerContext.cs | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) diff --git a/websocket-sharp/Net/HttpListenerContext.cs b/websocket-sharp/Net/HttpListenerContext.cs index aaf3ae59..c228880c 100644 --- a/websocket-sharp/Net/HttpListenerContext.cs +++ b/websocket-sharp/Net/HttpListenerContext.cs @@ -164,6 +164,28 @@ namespace WebSocketSharp.Net #endregion + #region Private Methods + + private static string createErrorContent ( + int statusCode, string statusDescription, string message + ) + { + return message != null && message.Length > 0 + ? String.Format ( + "

{0} {1} ({2})

", + statusCode, + statusDescription, + message + ) + : String.Format ( + "

{0} {1}

", + statusCode, + statusDescription + ); + } + + #endregion + #region Internal Methods internal bool Authenticate ()