From e29cfd970a77721e3e522abe01129dd85b050b10 Mon Sep 17 00:00:00 2001 From: sta Date: Fri, 29 May 2020 19:24:24 +0900 Subject: [PATCH] [Modify] Add it --- websocket-sharp/Net/WebHeaderCollection.cs | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/websocket-sharp/Net/WebHeaderCollection.cs b/websocket-sharp/Net/WebHeaderCollection.cs index 1e49911f..8413b773 100644 --- a/websocket-sharp/Net/WebHeaderCollection.cs +++ b/websocket-sharp/Net/WebHeaderCollection.cs @@ -879,6 +879,20 @@ namespace WebSocketSharp.Net } } + private void checkRestricted (string name, HttpHeaderType headerType) + { + if (_internallyUsed) + return; + + var res = headerType == HttpHeaderType.Response; + + if (isRestricted (name, res)) { + var msg = "The header is a restricted header."; + + throw new ArgumentException (msg); + } + } + private void checkState (bool response) { if (_state == HttpHeaderType.Unspecified)