aboutsummaryrefslogtreecommitdiff
path: root/SocketHttpListener/Net/WebHeaderCollection.cs
diff options
context:
space:
mode:
authorTthecreator <epostvanthomas@kpnmail.nl>2019-01-22 15:22:42 +0000
committerGitHub <noreply@github.com>2019-01-22 15:22:42 +0000
commit189b99df16bd4c93cc96422d7282d01d9ff5b82f (patch)
tree26d7da95fe3e3b2772b8b39a2463a6c0ac7652fc /SocketHttpListener/Net/WebHeaderCollection.cs
parenta00c0defa8cb22774f5dc8a7d566eb36ac7307e8 (diff)
parentedcfd8b565f632088c8b1f826db8e2fbecf9790d (diff)
Merge pull request #1 from jellyfin/dev
Update from jellyfin repo
Diffstat (limited to 'SocketHttpListener/Net/WebHeaderCollection.cs')
-rw-r--r--SocketHttpListener/Net/WebHeaderCollection.cs15
1 files changed, 4 insertions, 11 deletions
diff --git a/SocketHttpListener/Net/WebHeaderCollection.cs b/SocketHttpListener/Net/WebHeaderCollection.cs
index ed3cb921c..34fca808b 100644
--- a/SocketHttpListener/Net/WebHeaderCollection.cs
+++ b/SocketHttpListener/Net/WebHeaderCollection.cs
@@ -1,13 +1,8 @@
using System;
-using System.Collections;
using System.Collections.Generic;
-using System.Collections.Specialized;
-using System.Net;
using System.Runtime.InteropServices;
-using System.Runtime.Serialization;
using System.Text;
using MediaBrowser.Model.Services;
-using MediaBrowser.Model.Extensions;
namespace SocketHttpListener.Net
{
@@ -213,8 +208,7 @@ namespace SocketHttpListener.Net
if (!IsHeaderName(headerName))
throw new ArgumentException("Invalid character in header");
- HeaderInfo info;
- if (!headers.TryGetValue(headerName, out info))
+ if (!headers.TryGetValue(headerName, out HeaderInfo info))
return false;
var flag = response ? HeaderInfo.Response : HeaderInfo.Request;
@@ -239,7 +233,7 @@ namespace SocketHttpListener.Net
internal string ToStringMultiValue()
{
- StringBuilder sb = new StringBuilder();
+ var sb = new StringBuilder();
int count = base.Count;
for (int i = 0; i < count; i++)
@@ -268,7 +262,7 @@ namespace SocketHttpListener.Net
public override string ToString()
{
- StringBuilder sb = new StringBuilder();
+ var sb = new StringBuilder();
int count = base.Count;
for (int i = 0; i < count; i++)
@@ -318,8 +312,7 @@ namespace SocketHttpListener.Net
if (headerName == null)
return false;
- HeaderInfo info;
- return headers.TryGetValue(headerName, out info) && (info & HeaderInfo.MultiValue) != 0;
+ return headers.TryGetValue(headerName, out HeaderInfo info) && (info & HeaderInfo.MultiValue) != 0;
}
internal static bool IsHeaderValue(string value)