From 68036554dbb158b1dde1c55d1f2c0fab75e6dbbe Mon Sep 17 00:00:00 2001 From: sta Date: Wed, 20 May 2020 19:45:20 +0900 Subject: [PATCH] [Modify] Add it --- websocket-sharp/Net/WebHeaderCollection.cs | 12 ++++++++++++ 1 file changed, 12 insertions(+) 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)