diff --git a/websocket-sharp/Net/HttpUtility.cs b/websocket-sharp/Net/HttpUtility.cs index 7d1b4001..af2be570 100644 --- a/websocket-sharp/Net/HttpUtility.cs +++ b/websocket-sharp/Net/HttpUtility.cs @@ -996,7 +996,10 @@ namespace WebSocketSharp.Net public static string HtmlEncode (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 ();