diff --git a/websocket-sharp/Net/WebHeaderCollection.cs b/websocket-sharp/Net/WebHeaderCollection.cs index f641efee..550422e2 100644 --- a/websocket-sharp/Net/WebHeaderCollection.cs +++ b/websocket-sharp/Net/WebHeaderCollection.cs @@ -953,7 +953,16 @@ namespace WebSocketSharp.Net ? header.Substring (idx + 1) : String.Empty; - InternalSet (name, val, response); + name = checkName (name, "header"); + val = checkValue (val, "header"); + + if (isMultiValue (name, response)) { + base.Add (name, val); + + return; + } + + base.Set (name, val); } internal void InternalSet (string name, string value, bool response)