diff options
| author | Tthecreator <epostvanthomas@kpnmail.nl> | 2019-01-22 15:22:42 +0000 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2019-01-22 15:22:42 +0000 |
| commit | 189b99df16bd4c93cc96422d7282d01d9ff5b82f (patch) | |
| tree | 26d7da95fe3e3b2772b8b39a2463a6c0ac7652fc /SocketHttpListener/Net/HttpListenerRequest.cs | |
| parent | a00c0defa8cb22774f5dc8a7d566eb36ac7307e8 (diff) | |
| parent | edcfd8b565f632088c8b1f826db8e2fbecf9790d (diff) | |
Merge pull request #1 from jellyfin/dev
Update from jellyfin repo
Diffstat (limited to 'SocketHttpListener/Net/HttpListenerRequest.cs')
| -rw-r--r-- | SocketHttpListener/Net/HttpListenerRequest.cs | 21 |
1 files changed, 7 insertions, 14 deletions
diff --git a/SocketHttpListener/Net/HttpListenerRequest.cs b/SocketHttpListener/Net/HttpListenerRequest.cs index 16e245611..4924a7fa8 100644 --- a/SocketHttpListener/Net/HttpListenerRequest.cs +++ b/SocketHttpListener/Net/HttpListenerRequest.cs @@ -1,16 +1,9 @@ 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; namespace SocketHttpListener.Net @@ -29,7 +22,7 @@ namespace SocketHttpListener.Net private static CookieCollection ParseCookies(Uri uri, string setCookieHeader) { - CookieCollection cookies = new CookieCollection(); + var cookies = new CookieCollection(); return cookies; } @@ -88,7 +81,7 @@ namespace SocketHttpListener.Net } } } - return TextEncodingExtensions.GetDefaultEncoding(); + return Encoding.UTF8; } } @@ -177,7 +170,7 @@ namespace SocketHttpListener.Net { get { - QueryParamCollection queryString = new QueryParamCollection(); + var queryString = new QueryParamCollection(); Helpers.FillFromString(queryString, Url.Query, true, ContentEncoding); return queryString; } @@ -203,7 +196,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 +295,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 +340,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 |
