aboutsummaryrefslogtreecommitdiff
path: root/SocketHttpListener/Net/WebHeaderCollection.cs
diff options
context:
space:
mode:
authorstefan <stefan@hegedues.at>2018-09-12 19:26:21 +0200
committerstefan <stefan@hegedues.at>2018-09-12 19:26:21 +0200
commit48facb797ed912e4ea6b04b17d1ff190ac2daac4 (patch)
tree8dae77a31670a888d733484cb17dd4077d5444e8 /SocketHttpListener/Net/WebHeaderCollection.cs
parentc32d8656382a0eacb301692e0084377fc433ae9b (diff)
Update to 3.5.2 and .net core 2.1
Diffstat (limited to 'SocketHttpListener/Net/WebHeaderCollection.cs')
-rw-r--r--SocketHttpListener/Net/WebHeaderCollection.cs25
1 files changed, 0 insertions, 25 deletions
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<string, HeaderInfo> 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)