[Modify] Throw exception

This commit is contained in:
sta 2018-09-21 19:35:43 +09:00
parent 55d848a8bf
commit 680404686c

View File

@ -1305,7 +1305,10 @@ namespace WebSocketSharp.Net
public static string UrlPathEncode (string s) public static string UrlPathEncode (string s)
{ {
if (s == null || s.Length == 0) if (s == null)
throw new ArgumentNullException ("s");
if (s.Length == 0)
return s; return s;
var buff = new StringBuilder (); var buff = new StringBuilder ();