|
|
|
@ -1296,11 +1296,12 @@ namespace WebSocketSharp.Net
|
|
|
|
|
|
|
|
|
|
|
|
public static byte[] UrlEncodeUnicodeToBytes (string s)
|
|
|
|
public static byte[] UrlEncodeUnicodeToBytes (string s)
|
|
|
|
{
|
|
|
|
{
|
|
|
|
return s == null
|
|
|
|
if (s == null)
|
|
|
|
? null
|
|
|
|
throw new ArgumentNullException ("s");
|
|
|
|
: s.Length == 0
|
|
|
|
|
|
|
|
? new byte[0]
|
|
|
|
return s.Length > 0
|
|
|
|
: InternalUrlEncodeUnicodeToBytes (s);
|
|
|
|
? InternalUrlEncodeUnicodeToBytes (s)
|
|
|
|
|
|
|
|
: new byte[0];
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
public static string UrlPathEncode (string s)
|
|
|
|
public static string UrlPathEncode (string s)
|
|
|
|
|