diff --git a/websocket-sharp/Net/HttpUtility.cs b/websocket-sharp/Net/HttpUtility.cs index 15ea0557..3859598b 100644 --- a/websocket-sharp/Net/HttpUtility.cs +++ b/websocket-sharp/Net/HttpUtility.cs @@ -1305,7 +1305,10 @@ namespace WebSocketSharp.Net 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; var buff = new StringBuilder ();