From 48facb797ed912e4ea6b04b17d1ff190ac2daac4 Mon Sep 17 00:00:00 2001 From: stefan Date: Wed, 12 Sep 2018 19:26:21 +0200 Subject: Update to 3.5.2 and .net core 2.1 --- SocketHttpListener/Net/WebHeaderCollection.cs | 25 ------------------------- 1 file changed, 25 deletions(-) (limited to 'SocketHttpListener/Net/WebHeaderCollection.cs') diff --git a/SocketHttpListener/Net/WebHeaderCollection.cs b/SocketHttpListener/Net/WebHeaderCollection.cs index d82dc6816..4bed81404 100644 --- a/SocketHttpListener/Net/WebHeaderCollection.cs +++ b/SocketHttpListener/Net/WebHeaderCollection.cs @@ -35,8 +35,6 @@ namespace SocketHttpListener.Net }; static readonly Dictionary headers; - HeaderInfo? headerRestriction; - HeaderInfo? headerConsistency; static WebHeaderCollection() { @@ -108,7 +106,6 @@ namespace SocketHttpListener.Net if (name == null) throw new ArgumentNullException("name"); - ThrowIfRestricted(name); this.AddWithoutValidate(name, value); } @@ -237,7 +234,6 @@ namespace SocketHttpListener.Net if (!IsHeaderValue(value)) throw new ArgumentException("invalid header value"); - ThrowIfRestricted(name); base.Set(name, value); } @@ -317,27 +313,6 @@ namespace SocketHttpListener.Net } } - // Private Methods - - public override int Remove(string name) - { - ThrowIfRestricted(name); - return base.Remove(name); - } - - protected void ThrowIfRestricted(string headerName) - { - if (!headerRestriction.HasValue) - return; - - HeaderInfo info; - if (!headers.TryGetValue(headerName, out info)) - return; - - if ((info & headerRestriction.Value) != 0) - throw new ArgumentException("This header must be modified with the appropriate property."); - } - internal static bool IsMultiValue(string headerName) { if (headerName == null) -- cgit v1.2.3