diff --git a/websocket-sharp/Net/HttpUtility.cs b/websocket-sharp/Net/HttpUtility.cs index cac7fc49..3f5b4d68 100644 --- a/websocket-sharp/Net/HttpUtility.cs +++ b/websocket-sharp/Net/HttpUtility.cs @@ -588,47 +588,6 @@ namespace WebSocketSharp.Net } } - private static void urlEncodeUnicode (char c, Stream output) - { - if (c > 31 && c < 127) { - if (c == ' ') { - output.WriteByte ((byte) '+'); - return; - } - - if (isNumeric (c)) { - output.WriteByte ((byte) c); - return; - } - - if (isAlphabet (c)) { - output.WriteByte ((byte) c); - return; - } - - if (isUnreserved (c)) { - output.WriteByte ((byte) c); - return; - } - } - - output.WriteByte ((byte) '%'); - output.WriteByte ((byte) 'u'); - - var i = (int) c; - var idx = i >> 12; - output.WriteByte ((byte) _hexChars[idx]); - - idx = (i >> 8) & 0x0F; - output.WriteByte ((byte) _hexChars[idx]); - - idx = (i >> 4) & 0x0F; - output.WriteByte ((byte) _hexChars[idx]); - - idx = i & 0x0F; - output.WriteByte ((byte) _hexChars[idx]); - } - private static void urlPathEncode (char c, StringBuilder output) { if (c > 32 && c < 127) {