aboutsummaryrefslogtreecommitdiff
path: root/SocketHttpListener/HttpResponse.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/HttpResponse.cs
parenta00c0defa8cb22774f5dc8a7d566eb36ac7307e8 (diff)
parentedcfd8b565f632088c8b1f826db8e2fbecf9790d (diff)
Merge pull request #1 from jellyfin/dev
Update from jellyfin repo
Diffstat (limited to 'SocketHttpListener/HttpResponse.cs')
-rw-r--r--SocketHttpListener/HttpResponse.cs48
1 files changed, 8 insertions, 40 deletions
diff --git a/SocketHttpListener/HttpResponse.cs b/SocketHttpListener/HttpResponse.cs
index 535fde031..bcfa4a906 100644
--- a/SocketHttpListener/HttpResponse.cs
+++ b/SocketHttpListener/HttpResponse.cs
@@ -1,13 +1,11 @@
using System;
-using System.Collections.Specialized;
-using System.IO;
+using System.Linq;
using System.Net;
using System.Text;
-using HttpStatusCode = SocketHttpListener.Net.HttpStatusCode;
-using HttpVersion = SocketHttpListener.Net.HttpVersion;
-using System.Linq;
using MediaBrowser.Model.Services;
using SocketHttpListener.Net;
+using HttpStatusCode = SocketHttpListener.Net.HttpStatusCode;
+using HttpVersion = SocketHttpListener.Net.HttpVersion;
namespace SocketHttpListener
{
@@ -48,13 +46,7 @@ namespace SocketHttpListener
#region Public Properties
- public CookieCollection Cookies
- {
- get
- {
- return GetCookies(Headers, true);
- }
- }
+ public CookieCollection Cookies => GetCookies(Headers, true);
private static CookieCollection GetCookies(QueryParamCollection headers, bool response)
{
@@ -64,21 +56,9 @@ namespace SocketHttpListener
: CookieHelper.Parse(headers[name], response);
}
- public bool IsProxyAuthenticationRequired
- {
- get
- {
- return _code == "407";
- }
- }
+ public bool IsProxyAuthenticationRequired => _code == "407";
- public bool IsUnauthorized
- {
- get
- {
- return _code == "401";
- }
- }
+ public bool IsUnauthorized => _code == "401";
public bool IsWebSocketResponse
{
@@ -92,21 +72,9 @@ namespace SocketHttpListener
}
}
- public string Reason
- {
- get
- {
- return _reason;
- }
- }
+ public string Reason => _reason;
- public string StatusCode
- {
- get
- {
- return _code;
- }
- }
+ public string StatusCode => _code;
#endregion