From 5092a2ff3a5fe8558e5965715bbe0a328ac7c4ef Mon Sep 17 00:00:00 2001 From: sta Date: Fri, 26 Oct 2018 20:13:57 +0900 Subject: [PATCH] [Modify] Remove it --- websocket-sharp/Net/HttpUtility.cs | 51 ------------------------------ 1 file changed, 51 deletions(-) diff --git a/websocket-sharp/Net/HttpUtility.cs b/websocket-sharp/Net/HttpUtility.cs index cedee8d7..c140efb3 100644 --- a/websocket-sharp/Net/HttpUtility.cs +++ b/websocket-sharp/Net/HttpUtility.cs @@ -806,57 +806,6 @@ namespace WebSocketSharp.Net return null; } - internal static string InternalUrlDecode ( - byte[] bytes, int offset, int count, Encoding encoding) - { - var output = new StringBuilder (); - using (var acc = new MemoryStream ()) { - var end = count + offset; - for (var i = offset; i < end; i++) { - if (bytes[i] == '%' && i + 2 < count && bytes[i + 1] != '%') { - int xchar; - if (bytes[i + 1] == (byte) 'u' && i + 5 < end) { - if (acc.Length > 0) { - output.Append (getChars (acc, encoding)); - acc.SetLength (0); - } - - xchar = getChar (bytes, i + 2, 4); - if (xchar != -1) { - output.Append ((char) xchar); - i += 5; - - continue; - } - } - else if ((xchar = getChar (bytes, i + 1, 2)) != -1) { - acc.WriteByte ((byte) xchar); - i += 2; - - continue; - } - } - - if (acc.Length > 0) { - output.Append (getChars (acc, encoding)); - acc.SetLength (0); - } - - if (bytes[i] == '+') { - output.Append (' '); - continue; - } - - output.Append ((char) bytes[i]); - } - - if (acc.Length > 0) - output.Append (getChars (acc, encoding)); - } - - return output.ToString (); - } - internal static byte[] InternalUrlDecodeToBytes (byte[] bytes, int offset, int count) { using (var res = new MemoryStream ()) {