diff --git a/websocket-sharp/Net/WebHeaderCollection.cs b/websocket-sharp/Net/WebHeaderCollection.cs index 2b943019..ca66fbe0 100644 --- a/websocket-sharp/Net/WebHeaderCollection.cs +++ b/websocket-sharp/Net/WebHeaderCollection.cs @@ -831,9 +831,12 @@ namespace WebSocketSharp.Net private static string checkValue (string value) { - if (value == null || value.Length == 0) + if (value == null) return String.Empty; + if (value.Length == 0) + return value; + value = value.Trim (); if (value.Length > 65535) {