From 51596564fc8da2576caa2bb95331ad29310327e0 Mon Sep 17 00:00:00 2001 From: sta Date: Tue, 8 Dec 2020 16:41:09 +0900 Subject: [PATCH] [Modify] Remove it --- websocket-sharp/Net/HttpConnection.cs | 37 --------------------------- 1 file changed, 37 deletions(-) diff --git a/websocket-sharp/Net/HttpConnection.cs b/websocket-sharp/Net/HttpConnection.cs index ca149045..d2aa9fe9 100644 --- a/websocket-sharp/Net/HttpConnection.cs +++ b/websocket-sharp/Net/HttpConnection.cs @@ -614,43 +614,6 @@ namespace WebSocketSharp.Net } } - public void SendError (string message, int status) - { - if (_socket == null) - return; - - lock (_sync) { - if (_socket == null) - return; - - try { - var res = _context.Response; - res.StatusCode = status; - res.ContentType = "text/html"; - - var content = new StringBuilder (64); - content.AppendFormat ( - "

{0} {1}", status, res.StatusDescription - ); - - if (message != null && message.Length > 0) - content.AppendFormat (" ({0})

", message); - else - content.Append (""); - - var enc = Encoding.UTF8; - var entity = enc.GetBytes (content.ToString ()); - res.ContentEncoding = enc; - res.ContentLength64 = entity.LongLength; - - res.Close (entity, true); - } - catch { - Close (true); - } - } - } - #endregion } }