diff --git a/websocket-sharp/Net/WebHeaderCollection.cs b/websocket-sharp/Net/WebHeaderCollection.cs index d290422b..8104c99b 100644 --- a/websocket-sharp/Net/WebHeaderCollection.cs +++ b/websocket-sharp/Net/WebHeaderCollection.cs @@ -772,6 +772,19 @@ namespace WebSocketSharp.Net doWithCheckingState (act, checkName (name), value, true); } + private void add (string name, string value, HttpHeaderType headerType) + { + base.Add (name, value); + + if (_state != HttpHeaderType.Unspecified) + return; + + if (headerType == HttpHeaderType.Unspecified) + return; + + _state = headerType; + } + private void addWithoutCheckingName (string name, string value) { doWithoutCheckingName (base.Add, name, value);