From 0bb7e462db391d9324259abe6d2c2670a7e6ad60 Mon Sep 17 00:00:00 2001 From: sta Date: Wed, 4 Mar 2020 21:28:31 +0900 Subject: [PATCH] [Modify] Polish it --- websocket-sharp/Net/WebHeaderCollection.cs | 3 +++ 1 file changed, 3 insertions(+) diff --git a/websocket-sharp/Net/WebHeaderCollection.cs b/websocket-sharp/Net/WebHeaderCollection.cs index a9993a5f..66bd7045 100644 --- a/websocket-sharp/Net/WebHeaderCollection.cs +++ b/websocket-sharp/Net/WebHeaderCollection.cs @@ -797,6 +797,9 @@ namespace WebSocketSharp.Net name = name.Trim (); + if (name.Length == 0) + throw new ArgumentException ("A string of spaces.", "name"); + if (!IsHeaderName (name)) { var msg = "It contains an invalid character.";