[Modify] Replace it
This commit is contained in:
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…
Reference in New Issue
Block a user