diff --git a/websocket-sharp/Net/WebHeaderCollection.cs b/websocket-sharp/Net/WebHeaderCollection.cs index 3520c0f3..716cd89e 100644 --- a/websocket-sharp/Net/WebHeaderCollection.cs +++ b/websocket-sharp/Net/WebHeaderCollection.cs @@ -849,6 +849,18 @@ namespace WebSocketSharp.Net } } + private void checkRestricted (string name, bool response) + { + if (_internallyUsed) + return; + + if (isRestricted (name, response)) { + var msg = "The header is a restricted header."; + + throw new ArgumentException (msg); + } + } + private void checkState (bool response) { if (_state == HttpHeaderType.Unspecified)