aboutsummaryrefslogtreecommitdiff
path: root/SocketHttpListener/Net/HttpListenerRequest.cs
diff options
context:
space:
mode:
authorAndrew Rabert <6550543+nvllsvm@users.noreply.github.com>2019-01-19 15:11:50 -0500
committerGitHub <noreply@github.com>2019-01-19 15:11:50 -0500
commit55538764fa06a64795c099fc6496df9dbb4156bd (patch)
tree8c1f94861ecebdf634b70a7265945b6f8f13aff1 /SocketHttpListener/Net/HttpListenerRequest.cs
parent3b52035ee064a5d9aa215d9515211d4508585d39 (diff)
parentc5430f86b0b5863482e7c4f7e55a79c7d88c133b (diff)
Merge pull request #575 from EraYaN/reformat
Reformat all C# server code to conform with code standards
Diffstat (limited to 'SocketHttpListener/Net/HttpListenerRequest.cs')
-rw-r--r--SocketHttpListener/Net/HttpListenerRequest.cs20
1 files changed, 7 insertions, 13 deletions
diff --git a/SocketHttpListener/Net/HttpListenerRequest.cs b/SocketHttpListener/Net/HttpListenerRequest.cs
index 16e245611..1c832367e 100644
--- a/SocketHttpListener/Net/HttpListenerRequest.cs
+++ b/SocketHttpListener/Net/HttpListenerRequest.cs
@@ -1,17 +1,11 @@
using System;
-using System.Collections.Specialized;
+using System.Collections.Generic;
using System.Globalization;
-using System.IO;
using System.Net;
-using System.Security.Cryptography.X509Certificates;
using System.Text;
-using System.Threading.Tasks;
-using MediaBrowser.Model.Net;
using MediaBrowser.Model.Services;
-using MediaBrowser.Model.Text;
-using SocketHttpListener.Primitives;
-using System.Collections.Generic;
using SocketHttpListener.Net.WebSockets;
+using SocketHttpListener.Primitives;
namespace SocketHttpListener.Net
{
@@ -29,7 +23,7 @@ namespace SocketHttpListener.Net
private static CookieCollection ParseCookies(Uri uri, string setCookieHeader)
{
- CookieCollection cookies = new CookieCollection();
+ var cookies = new CookieCollection();
return cookies;
}
@@ -177,7 +171,7 @@ namespace SocketHttpListener.Net
{
get
{
- QueryParamCollection queryString = new QueryParamCollection();
+ var queryString = new QueryParamCollection();
Helpers.FillFromString(queryString, Url.Query, true, ContentEncoding);
return queryString;
}
@@ -203,7 +197,7 @@ namespace SocketHttpListener.Net
return null;
}
- bool success = Uri.TryCreate(referrer, UriKind.RelativeOrAbsolute, out Uri urlReferrer);
+ bool success = Uri.TryCreate(referrer, UriKind.RelativeOrAbsolute, out var urlReferrer);
return success ? urlReferrer : null;
}
}
@@ -302,7 +296,7 @@ namespace SocketHttpListener.Net
// collect comma-separated values into list
- List<string> values = new List<string>();
+ var values = new List<string>();
int i = 0;
while (i < l)
@@ -347,7 +341,7 @@ namespace SocketHttpListener.Net
private static string UrlDecodeStringFromStringInternal(string s, Encoding e)
{
int count = s.Length;
- UrlDecoder helper = new UrlDecoder(count, e);
+ var helper = new UrlDecoder(count, e);
// go through the string's chars collapsing %XX and %uXXXX and
// appending each char as char, with exception of %XX constructs