From 9a584f4b80259a914713ffa3d57dfc610857adb4 Mon Sep 17 00:00:00 2001 From: sta Date: Thu, 2 Jul 2020 19:43:35 +0900 Subject: [PATCH] [Modify] Replace it --- websocket-sharp/Net/WebHeaderCollection.cs | 17 +---------------- 1 file changed, 1 insertion(+), 16 deletions(-) diff --git a/websocket-sharp/Net/WebHeaderCollection.cs b/websocket-sharp/Net/WebHeaderCollection.cs index fdc3663e..75995063 100644 --- a/websocket-sharp/Net/WebHeaderCollection.cs +++ b/websocket-sharp/Net/WebHeaderCollection.cs @@ -1599,22 +1599,7 @@ namespace WebSocketSharp.Net /// public static bool IsRestricted (string headerName, bool response) { - if (headerName == null) - throw new ArgumentNullException ("headerName"); - - if (headerName.Length == 0) - throw new ArgumentException ("An empty string.", "headerName"); - - headerName = headerName.Trim (); - - if (headerName.Length == 0) - throw new ArgumentException ("A string of spaces.", "headerName"); - - if (!headerName.IsToken ()) { - var msg = "It contains an invalid character."; - - throw new ArgumentException (msg, "headerName"); - } + headerName = checkName (headerName, "headerName"); return isRestricted (headerName, response); }