[Modify] Replace it

master
sta 7 years ago
parent b922bd7cbd
commit 76a2796d85

@ -1154,7 +1154,14 @@ namespace WebSocketSharp.Net
public static byte[] UrlDecodeToBytes (string s)
{
return UrlDecodeToBytes (s, Encoding.UTF8);
if (s == null)
throw new ArgumentNullException ("s");
if (s.Length == 0)
return new byte[0];
var bytes = Encoding.ASCII.GetBytes (s);
return urlDecodeToBytes (bytes, 0, bytes.Length);
}
public static byte[] UrlDecodeToBytes (string s, Encoding encoding)

Loading…
Cancel
Save