diff options
Diffstat (limited to 'SocketHttpListener/Net')
34 files changed, 343 insertions, 448 deletions
diff --git a/SocketHttpListener/Net/AuthenticationTypes.cs b/SocketHttpListener/Net/AuthenticationTypes.cs index df6b9d576..991133c29 100644 --- a/SocketHttpListener/Net/AuthenticationTypes.cs +++ b/SocketHttpListener/Net/AuthenticationTypes.cs @@ -1,8 +1,4 @@ -using System; -using System.Collections.Generic; -using System.Text; - -namespace SocketHttpListener.Net +namespace SocketHttpListener.Net { internal class AuthenticationTypes { diff --git a/SocketHttpListener/Net/BoundaryType.cs b/SocketHttpListener/Net/BoundaryType.cs index f1e799f63..8c940c25d 100644 --- a/SocketHttpListener/Net/BoundaryType.cs +++ b/SocketHttpListener/Net/BoundaryType.cs @@ -1,9 +1,4 @@ -using System; -using System.Collections.Generic; -using System.Text; -using System.Threading.Tasks; - -namespace SocketHttpListener.Net +namespace SocketHttpListener.Net { internal enum BoundaryType { diff --git a/SocketHttpListener/Net/ChunkStream.cs b/SocketHttpListener/Net/ChunkStream.cs index 5cc01614f..b9b5edb38 100644 --- a/SocketHttpListener/Net/ChunkStream.cs +++ b/SocketHttpListener/Net/ChunkStream.cs @@ -1,5 +1,4 @@ using System; -using System.Collections; using System.Collections.Generic; using System.Globalization; using System.IO; diff --git a/SocketHttpListener/Net/ChunkedInputStream.cs b/SocketHttpListener/Net/ChunkedInputStream.cs index 4d6d96a6c..e24218456 100644 --- a/SocketHttpListener/Net/ChunkedInputStream.cs +++ b/SocketHttpListener/Net/ChunkedInputStream.cs @@ -1,8 +1,6 @@ using System; using System.IO; using System.Net; -using System.Runtime.InteropServices; -using SocketHttpListener.Primitives; namespace SocketHttpListener.Net { diff --git a/SocketHttpListener/Net/CookieHelper.cs b/SocketHttpListener/Net/CookieHelper.cs index 6c1764e09..32b46fb69 100644 --- a/SocketHttpListener/Net/CookieHelper.cs +++ b/SocketHttpListener/Net/CookieHelper.cs @@ -3,7 +3,6 @@ using System.Collections.Generic; using System.Globalization; using System.Net; using System.Text; -using System.Threading.Tasks; namespace SocketHttpListener.Net { diff --git a/SocketHttpListener/Net/EntitySendFormat.cs b/SocketHttpListener/Net/EntitySendFormat.cs index 9caee3e11..cb3aa424c 100644 --- a/SocketHttpListener/Net/EntitySendFormat.cs +++ b/SocketHttpListener/Net/EntitySendFormat.cs @@ -1,9 +1,4 @@ -using System; -using System.Collections.Generic; -using System.Text; -using System.Threading.Tasks; - -namespace SocketHttpListener.Net +namespace SocketHttpListener.Net { internal enum EntitySendFormat { diff --git a/SocketHttpListener/Net/HttpConnection.cs b/SocketHttpListener/Net/HttpConnection.cs index 4fc9a468c..86f9dc635 100644 --- a/SocketHttpListener/Net/HttpConnection.cs +++ b/SocketHttpListener/Net/HttpConnection.cs @@ -3,19 +3,17 @@ using System.IO; using System.Net; using System.Net.Security; using System.Net.Sockets; +using System.Security.Authentication; using System.Security.Cryptography.X509Certificates; using System.Text; +using System.Threading; using System.Threading.Tasks; using MediaBrowser.Model.Cryptography; using MediaBrowser.Model.IO; -using Microsoft.Extensions.Logging; -using MediaBrowser.Model.Net; using MediaBrowser.Model.System; using MediaBrowser.Model.Text; +using Microsoft.Extensions.Logging; using SocketHttpListener.Primitives; -using System.Security.Authentication; - -using System.Threading; namespace SocketHttpListener.Net { sealed class HttpConnection diff --git a/SocketHttpListener/Net/HttpEndPointListener.cs b/SocketHttpListener/Net/HttpEndPointListener.cs index a108e7dd4..ee6ddaa84 100644 --- a/SocketHttpListener/Net/HttpEndPointListener.cs +++ b/SocketHttpListener/Net/HttpEndPointListener.cs @@ -1,21 +1,15 @@ using System; -using System.Collections; using System.Collections.Generic; -using System.IO; using System.Net; using System.Net.Sockets; using System.Security.Cryptography.X509Certificates; using System.Threading; using MediaBrowser.Model.Cryptography; using MediaBrowser.Model.IO; -using Microsoft.Extensions.Logging; using MediaBrowser.Model.Net; using MediaBrowser.Model.System; using MediaBrowser.Model.Text; -using SocketHttpListener.Primitives; -using ProtocolType = MediaBrowser.Model.Net.ProtocolType; -using SocketType = MediaBrowser.Model.Net.SocketType; -using System.Threading.Tasks; +using Microsoft.Extensions.Logging; namespace SocketHttpListener.Net { @@ -209,7 +203,7 @@ namespace SocketHttpListener.Net return; } - if(accepted == null) + if (accepted == null) { return; } diff --git a/SocketHttpListener/Net/HttpEndPointManager.cs b/SocketHttpListener/Net/HttpEndPointManager.cs index 01b5ae9bd..787730ed4 100644 --- a/SocketHttpListener/Net/HttpEndPointManager.cs +++ b/SocketHttpListener/Net/HttpEndPointManager.cs @@ -3,12 +3,7 @@ using System.Collections; using System.Collections.Generic; using System.Net; using System.Net.Sockets; -using System.Reflection; -using System.Threading.Tasks; -using MediaBrowser.Model.IO; using Microsoft.Extensions.Logging; -using MediaBrowser.Model.Net; -using SocketHttpListener.Primitives; namespace SocketHttpListener.Net { diff --git a/SocketHttpListener/Net/HttpKnownHeaderNames.cs b/SocketHttpListener/Net/HttpKnownHeaderNames.cs index ea4695850..bef25ab16 100644 --- a/SocketHttpListener/Net/HttpKnownHeaderNames.cs +++ b/SocketHttpListener/Net/HttpKnownHeaderNames.cs @@ -1,8 +1,4 @@ -using System; -using System.Collections.Generic; -using System.Text; - -namespace SocketHttpListener.Net +namespace SocketHttpListener.Net { internal static partial class HttpKnownHeaderNames { diff --git a/SocketHttpListener/Net/HttpListener.cs b/SocketHttpListener/Net/HttpListener.cs index a159cd273..4e2239a1a 100644 --- a/SocketHttpListener/Net/HttpListener.cs +++ b/SocketHttpListener/Net/HttpListener.cs @@ -1,17 +1,15 @@ using System; using System.Collections; using System.Collections.Generic; -using System.IO; using System.Net; using System.Security.Cryptography.X509Certificates; using MediaBrowser.Common.Net; using MediaBrowser.Model.Cryptography; using MediaBrowser.Model.IO; -using Microsoft.Extensions.Logging; using MediaBrowser.Model.Net; using MediaBrowser.Model.System; using MediaBrowser.Model.Text; -using SocketHttpListener.Primitives; +using Microsoft.Extensions.Logging; namespace SocketHttpListener.Net { diff --git a/SocketHttpListener/Net/HttpListenerContext.Managed.cs b/SocketHttpListener/Net/HttpListenerContext.Managed.cs index db795f742..a017d0d27 100644 --- a/SocketHttpListener/Net/HttpListenerContext.Managed.cs +++ b/SocketHttpListener/Net/HttpListenerContext.Managed.cs @@ -1,8 +1,8 @@ -using System.ComponentModel; +using System; +using System.ComponentModel; using System.Security.Principal; using System.Text; using System.Threading.Tasks; -using System; using MediaBrowser.Model.Text; using SocketHttpListener.Net.WebSockets; diff --git a/SocketHttpListener/Net/HttpListenerContext.cs b/SocketHttpListener/Net/HttpListenerContext.cs index e3e6eb906..0bb31ef3e 100644 --- a/SocketHttpListener/Net/HttpListenerContext.cs +++ b/SocketHttpListener/Net/HttpListenerContext.cs @@ -1,12 +1,8 @@ using System; using System.Net; using System.Security.Principal; -using MediaBrowser.Model.Cryptography; -using MediaBrowser.Model.IO; -using Microsoft.Extensions.Logging; -using MediaBrowser.Model.Text; -using SocketHttpListener.Net.WebSockets; using System.Threading.Tasks; +using SocketHttpListener.Net.WebSockets; namespace SocketHttpListener.Net { diff --git a/SocketHttpListener/Net/HttpListenerRequest.Managed.cs b/SocketHttpListener/Net/HttpListenerRequest.Managed.cs index 8b68afe33..54bfa36a0 100644 --- a/SocketHttpListener/Net/HttpListenerRequest.Managed.cs +++ b/SocketHttpListener/Net/HttpListenerRequest.Managed.cs @@ -1,12 +1,7 @@ using System; -using System.Text; -using System.Collections.Specialized; -using System.Globalization; using System.IO; -using System.Security.Authentication.ExtendedProtection; -using System.Security.Cryptography.X509Certificates; +using System.Text; using MediaBrowser.Model.Services; -using MediaBrowser.Model.Text; namespace SocketHttpListener.Net { diff --git a/SocketHttpListener/Net/HttpListenerRequest.cs b/SocketHttpListener/Net/HttpListenerRequest.cs index 16e245611..2e8396f6f 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 { diff --git a/SocketHttpListener/Net/HttpListenerRequestUriBuilder.cs b/SocketHttpListener/Net/HttpListenerRequestUriBuilder.cs index 63790d796..ced23d9c2 100644 --- a/SocketHttpListener/Net/HttpListenerRequestUriBuilder.cs +++ b/SocketHttpListener/Net/HttpListenerRequestUriBuilder.cs @@ -1,8 +1,8 @@ using System; using System.Collections.Generic; using System.Diagnostics; -using System.Text; using System.Globalization; +using System.Text; namespace SocketHttpListener.Net { diff --git a/SocketHttpListener/Net/HttpListenerResponse.Managed.cs b/SocketHttpListener/Net/HttpListenerResponse.Managed.cs index 8fb4518a1..ff4437d9e 100644 --- a/SocketHttpListener/Net/HttpListenerResponse.Managed.cs +++ b/SocketHttpListener/Net/HttpListenerResponse.Managed.cs @@ -1,14 +1,13 @@ using System; -using System.Collections.Generic; using System.Globalization; using System.IO; using System.Net; using System.Text; +using System.Threading; using System.Threading.Tasks; +using MediaBrowser.Model.IO; using MediaBrowser.Model.Text; using SocketHttpListener.Primitives; -using System.Threading; -using MediaBrowser.Model.IO; namespace SocketHttpListener.Net { diff --git a/SocketHttpListener/Net/HttpListenerResponse.cs b/SocketHttpListener/Net/HttpListenerResponse.cs index 351a206ee..f9455db72 100644 --- a/SocketHttpListener/Net/HttpListenerResponse.cs +++ b/SocketHttpListener/Net/HttpListenerResponse.cs @@ -1,14 +1,7 @@ using System; -using System.Collections.Generic; using System.IO; using System.Net; using System.Text; -using System.Threading.Tasks; -using System.Globalization; -using System.Runtime.InteropServices; -using System.ComponentModel; -using System.Diagnostics; -using Microsoft.Win32.SafeHandles; namespace SocketHttpListener.Net { diff --git a/SocketHttpListener/Net/HttpRequestStream.Managed.cs b/SocketHttpListener/Net/HttpRequestStream.Managed.cs index 493e2673b..a0b6cba7e 100644 --- a/SocketHttpListener/Net/HttpRequestStream.Managed.cs +++ b/SocketHttpListener/Net/HttpRequestStream.Managed.cs @@ -1,9 +1,5 @@ using System; -using System.Collections.Generic; using System.IO; -using System.Runtime.ExceptionServices; -using System.Text; -using System.Threading.Tasks; namespace SocketHttpListener.Net { diff --git a/SocketHttpListener/Net/HttpRequestStream.cs b/SocketHttpListener/Net/HttpRequestStream.cs index c9a1d5a2d..d5cbc86d8 100644 --- a/SocketHttpListener/Net/HttpRequestStream.cs +++ b/SocketHttpListener/Net/HttpRequestStream.cs @@ -1,7 +1,5 @@ using System; -using System.Collections.Generic; using System.IO; -using System.Text; using System.Threading; using System.Threading.Tasks; diff --git a/SocketHttpListener/Net/HttpResponseStream.Managed.cs b/SocketHttpListener/Net/HttpResponseStream.Managed.cs index 719dfcc12..5fcf08d02 100644 --- a/SocketHttpListener/Net/HttpResponseStream.Managed.cs +++ b/SocketHttpListener/Net/HttpResponseStream.Managed.cs @@ -1,15 +1,13 @@ using System; -using System.Collections.Generic; using System.IO; using System.Net; using System.Net.Sockets; -using System.Runtime.ExceptionServices; using System.Text; using System.Threading; using System.Threading.Tasks; using MediaBrowser.Model.IO; -using Microsoft.Extensions.Logging; using MediaBrowser.Model.System; +using Microsoft.Extensions.Logging; namespace SocketHttpListener.Net { diff --git a/SocketHttpListener/Net/HttpResponseStream.cs b/SocketHttpListener/Net/HttpResponseStream.cs index 5b7fa417f..8ae7f2881 100644 --- a/SocketHttpListener/Net/HttpResponseStream.cs +++ b/SocketHttpListener/Net/HttpResponseStream.cs @@ -1,7 +1,5 @@ using System; -using System.Collections.Generic; using System.IO; -using System.Text; using System.Threading; using System.Threading.Tasks; diff --git a/SocketHttpListener/Net/HttpStatusCode.cs b/SocketHttpListener/Net/HttpStatusCode.cs index 93da82ba0..d4bb61b8a 100644 --- a/SocketHttpListener/Net/HttpStatusCode.cs +++ b/SocketHttpListener/Net/HttpStatusCode.cs @@ -1,321 +1,321 @@ namespace SocketHttpListener.Net { - /// <summary> - /// Contains the values of the HTTP status codes. - /// </summary> - /// <remarks> - /// The HttpStatusCode enumeration contains the values of the HTTP status codes defined in - /// <see href="http://tools.ietf.org/html/rfc2616#section-10">RFC 2616</see> for HTTP 1.1. - /// </remarks> - public enum HttpStatusCode - { /// <summary> - /// Equivalent to status code 100. - /// Indicates that the client should continue with its request. - /// </summary> - Continue = 100, - /// <summary> - /// Equivalent to status code 101. - /// Indicates that the server is switching the HTTP version or protocol on the connection. - /// </summary> - SwitchingProtocols = 101, - /// <summary> - /// Equivalent to status code 200. - /// Indicates that the client's request has succeeded. - /// </summary> - OK = 200, - /// <summary> - /// Equivalent to status code 201. - /// Indicates that the client's request has been fulfilled and resulted in a new resource being - /// created. - /// </summary> - Created = 201, - /// <summary> - /// Equivalent to status code 202. - /// Indicates that the client's request has been accepted for processing, but the processing - /// hasn't been completed. - /// </summary> - Accepted = 202, - /// <summary> - /// Equivalent to status code 203. - /// Indicates that the returned metainformation is from a local or a third-party copy instead of - /// the origin server. - /// </summary> - NonAuthoritativeInformation = 203, - /// <summary> - /// Equivalent to status code 204. - /// Indicates that the server has fulfilled the client's request but doesn't need to return - /// an entity-body. - /// </summary> - NoContent = 204, - /// <summary> - /// Equivalent to status code 205. - /// Indicates that the server has fulfilled the client's request, and the user agent should - /// reset the document view which caused the request to be sent. - /// </summary> - ResetContent = 205, - /// <summary> - /// Equivalent to status code 206. - /// Indicates that the server has fulfilled the partial GET request for the resource. - /// </summary> - PartialContent = 206, - /// <summary> - /// <para> - /// Equivalent to status code 300. - /// Indicates that the requested resource corresponds to any of multiple representations. - /// </para> - /// <para> - /// MultipleChoices is a synonym for Ambiguous. - /// </para> - /// </summary> - MultipleChoices = 300, - /// <summary> - /// <para> - /// Equivalent to status code 300. - /// Indicates that the requested resource corresponds to any of multiple representations. - /// </para> - /// <para> - /// Ambiguous is a synonym for MultipleChoices. - /// </para> - /// </summary> - Ambiguous = 300, - /// <summary> - /// <para> - /// Equivalent to status code 301. - /// Indicates that the requested resource has been assigned a new permanent URI and - /// any future references to this resource should use one of the returned URIs. - /// </para> - /// <para> - /// MovedPermanently is a synonym for Moved. - /// </para> - /// </summary> - MovedPermanently = 301, - /// <summary> - /// <para> - /// Equivalent to status code 301. - /// Indicates that the requested resource has been assigned a new permanent URI and - /// any future references to this resource should use one of the returned URIs. - /// </para> - /// <para> - /// Moved is a synonym for MovedPermanently. - /// </para> - /// </summary> - Moved = 301, - /// <summary> - /// <para> - /// Equivalent to status code 302. - /// Indicates that the requested resource is located temporarily under a different URI. - /// </para> - /// <para> - /// Found is a synonym for Redirect. - /// </para> - /// </summary> - Found = 302, - /// <summary> - /// <para> - /// Equivalent to status code 302. - /// Indicates that the requested resource is located temporarily under a different URI. - /// </para> - /// <para> - /// Redirect is a synonym for Found. - /// </para> - /// </summary> - Redirect = 302, - /// <summary> - /// <para> - /// Equivalent to status code 303. - /// Indicates that the response to the request can be found under a different URI and - /// should be retrieved using a GET method on that resource. - /// </para> - /// <para> - /// SeeOther is a synonym for RedirectMethod. - /// </para> - /// </summary> - SeeOther = 303, - /// <summary> - /// <para> - /// Equivalent to status code 303. - /// Indicates that the response to the request can be found under a different URI and - /// should be retrieved using a GET method on that resource. - /// </para> - /// <para> - /// RedirectMethod is a synonym for SeeOther. - /// </para> - /// </summary> - RedirectMethod = 303, - /// <summary> - /// Equivalent to status code 304. - /// Indicates that the client has performed a conditional GET request and access is allowed, - /// but the document hasn't been modified. - /// </summary> - NotModified = 304, - /// <summary> - /// Equivalent to status code 305. - /// Indicates that the requested resource must be accessed through the proxy given by - /// the Location field. - /// </summary> - UseProxy = 305, - /// <summary> - /// Equivalent to status code 306. - /// This status code was used in a previous version of the specification, is no longer used, - /// and is reserved for future use. - /// </summary> - Unused = 306, - /// <summary> - /// <para> - /// Equivalent to status code 307. - /// Indicates that the requested resource is located temporarily under a different URI. - /// </para> - /// <para> - /// TemporaryRedirect is a synonym for RedirectKeepVerb. - /// </para> - /// </summary> - TemporaryRedirect = 307, - /// <summary> - /// <para> - /// Equivalent to status code 307. - /// Indicates that the requested resource is located temporarily under a different URI. - /// </para> - /// <para> - /// RedirectKeepVerb is a synonym for TemporaryRedirect. - /// </para> - /// </summary> - RedirectKeepVerb = 307, - /// <summary> - /// Equivalent to status code 400. - /// Indicates that the client's request couldn't be understood by the server due to - /// malformed syntax. - /// </summary> - BadRequest = 400, - /// <summary> - /// Equivalent to status code 401. - /// Indicates that the client's request requires user authentication. - /// </summary> - Unauthorized = 401, - /// <summary> - /// Equivalent to status code 402. - /// This status code is reserved for future use. - /// </summary> - PaymentRequired = 402, - /// <summary> - /// Equivalent to status code 403. - /// Indicates that the server understood the client's request but is refusing to fulfill it. - /// </summary> - Forbidden = 403, - /// <summary> - /// Equivalent to status code 404. - /// Indicates that the server hasn't found anything matching the request URI. - /// </summary> - NotFound = 404, - /// <summary> - /// Equivalent to status code 405. - /// Indicates that the method specified in the request line isn't allowed for the resource - /// identified by the request URI. - /// </summary> - MethodNotAllowed = 405, - /// <summary> - /// Equivalent to status code 406. - /// Indicates that the server doesn't have the appropriate resource to respond to the Accept - /// headers in the client's request. - /// </summary> - NotAcceptable = 406, - /// <summary> - /// Equivalent to status code 407. - /// Indicates that the client must first authenticate itself with the proxy. - /// </summary> - ProxyAuthenticationRequired = 407, - /// <summary> - /// Equivalent to status code 408. - /// Indicates that the client didn't produce a request within the time that the server was - /// prepared to wait. - /// </summary> - RequestTimeout = 408, - /// <summary> - /// Equivalent to status code 409. - /// Indicates that the client's request couldn't be completed due to a conflict on the server. - /// </summary> - Conflict = 409, - /// <summary> - /// Equivalent to status code 410. - /// Indicates that the requested resource is no longer available at the server and - /// no forwarding address is known. - /// </summary> - Gone = 410, - /// <summary> - /// Equivalent to status code 411. - /// Indicates that the server refuses to accept the client's request without a defined - /// Content-Length. - /// </summary> - LengthRequired = 411, - /// <summary> - /// Equivalent to status code 412. - /// Indicates that the precondition given in one or more of the request headers evaluated to - /// false when it was tested on the server. - /// </summary> - PreconditionFailed = 412, - /// <summary> - /// Equivalent to status code 413. - /// Indicates that the entity of the client's request is larger than the server is willing or - /// able to process. - /// </summary> - RequestEntityTooLarge = 413, - /// <summary> - /// Equivalent to status code 414. - /// Indicates that the request URI is longer than the server is willing to interpret. - /// </summary> - RequestUriTooLong = 414, - /// <summary> - /// Equivalent to status code 415. - /// Indicates that the entity of the client's request is in a format not supported by - /// the requested resource for the requested method. - /// </summary> - UnsupportedMediaType = 415, - /// <summary> - /// Equivalent to status code 416. - /// Indicates that none of the range specifier values in a Range request header overlap - /// the current extent of the selected resource. - /// </summary> - RequestedRangeNotSatisfiable = 416, - /// <summary> - /// Equivalent to status code 417. - /// Indicates that the expectation given in an Expect request header couldn't be met by - /// the server. - /// </summary> - ExpectationFailed = 417, - /// <summary> - /// Equivalent to status code 500. - /// Indicates that the server encountered an unexpected condition which prevented it from - /// fulfilling the client's request. - /// </summary> - InternalServerError = 500, - /// <summary> - /// Equivalent to status code 501. - /// Indicates that the server doesn't support the functionality required to fulfill the client's - /// request. - /// </summary> - NotImplemented = 501, - /// <summary> - /// Equivalent to status code 502. - /// Indicates that a gateway or proxy server received an invalid response from the upstream - /// server. - /// </summary> - BadGateway = 502, - /// <summary> - /// Equivalent to status code 503. - /// Indicates that the server is currently unable to handle the client's request due to - /// a temporary overloading or maintenance of the server. - /// </summary> - ServiceUnavailable = 503, - /// <summary> - /// Equivalent to status code 504. - /// Indicates that a gateway or proxy server didn't receive a timely response from the upstream - /// server or some other auxiliary server. - /// </summary> - GatewayTimeout = 504, - /// <summary> - /// Equivalent to status code 505. - /// Indicates that the server doesn't support the HTTP version used in the client's request. - /// </summary> - HttpVersionNotSupported = 505, - } + /// Contains the values of the HTTP status codes. + /// </summary> + /// <remarks> + /// The HttpStatusCode enumeration contains the values of the HTTP status codes defined in + /// <see href="http://tools.ietf.org/html/rfc2616#section-10">RFC 2616</see> for HTTP 1.1. + /// </remarks> + public enum HttpStatusCode + { + /// <summary> + /// Equivalent to status code 100. + /// Indicates that the client should continue with its request. + /// </summary> + Continue = 100, + /// <summary> + /// Equivalent to status code 101. + /// Indicates that the server is switching the HTTP version or protocol on the connection. + /// </summary> + SwitchingProtocols = 101, + /// <summary> + /// Equivalent to status code 200. + /// Indicates that the client's request has succeeded. + /// </summary> + OK = 200, + /// <summary> + /// Equivalent to status code 201. + /// Indicates that the client's request has been fulfilled and resulted in a new resource being + /// created. + /// </summary> + Created = 201, + /// <summary> + /// Equivalent to status code 202. + /// Indicates that the client's request has been accepted for processing, but the processing + /// hasn't been completed. + /// </summary> + Accepted = 202, + /// <summary> + /// Equivalent to status code 203. + /// Indicates that the returned metainformation is from a local or a third-party copy instead of + /// the origin server. + /// </summary> + NonAuthoritativeInformation = 203, + /// <summary> + /// Equivalent to status code 204. + /// Indicates that the server has fulfilled the client's request but doesn't need to return + /// an entity-body. + /// </summary> + NoContent = 204, + /// <summary> + /// Equivalent to status code 205. + /// Indicates that the server has fulfilled the client's request, and the user agent should + /// reset the document view which caused the request to be sent. + /// </summary> + ResetContent = 205, + /// <summary> + /// Equivalent to status code 206. + /// Indicates that the server has fulfilled the partial GET request for the resource. + /// </summary> + PartialContent = 206, + /// <summary> + /// <para> + /// Equivalent to status code 300. + /// Indicates that the requested resource corresponds to any of multiple representations. + /// </para> + /// <para> + /// MultipleChoices is a synonym for Ambiguous. + /// </para> + /// </summary> + MultipleChoices = 300, + /// <summary> + /// <para> + /// Equivalent to status code 300. + /// Indicates that the requested resource corresponds to any of multiple representations. + /// </para> + /// <para> + /// Ambiguous is a synonym for MultipleChoices. + /// </para> + /// </summary> + Ambiguous = 300, + /// <summary> + /// <para> + /// Equivalent to status code 301. + /// Indicates that the requested resource has been assigned a new permanent URI and + /// any future references to this resource should use one of the returned URIs. + /// </para> + /// <para> + /// MovedPermanently is a synonym for Moved. + /// </para> + /// </summary> + MovedPermanently = 301, + /// <summary> + /// <para> + /// Equivalent to status code 301. + /// Indicates that the requested resource has been assigned a new permanent URI and + /// any future references to this resource should use one of the returned URIs. + /// </para> + /// <para> + /// Moved is a synonym for MovedPermanently. + /// </para> + /// </summary> + Moved = 301, + /// <summary> + /// <para> + /// Equivalent to status code 302. + /// Indicates that the requested resource is located temporarily under a different URI. + /// </para> + /// <para> + /// Found is a synonym for Redirect. + /// </para> + /// </summary> + Found = 302, + /// <summary> + /// <para> + /// Equivalent to status code 302. + /// Indicates that the requested resource is located temporarily under a different URI. + /// </para> + /// <para> + /// Redirect is a synonym for Found. + /// </para> + /// </summary> + Redirect = 302, + /// <summary> + /// <para> + /// Equivalent to status code 303. + /// Indicates that the response to the request can be found under a different URI and + /// should be retrieved using a GET method on that resource. + /// </para> + /// <para> + /// SeeOther is a synonym for RedirectMethod. + /// </para> + /// </summary> + SeeOther = 303, + /// <summary> + /// <para> + /// Equivalent to status code 303. + /// Indicates that the response to the request can be found under a different URI and + /// should be retrieved using a GET method on that resource. + /// </para> + /// <para> + /// RedirectMethod is a synonym for SeeOther. + /// </para> + /// </summary> + RedirectMethod = 303, + /// <summary> + /// Equivalent to status code 304. + /// Indicates that the client has performed a conditional GET request and access is allowed, + /// but the document hasn't been modified. + /// </summary> + NotModified = 304, + /// <summary> + /// Equivalent to status code 305. + /// Indicates that the requested resource must be accessed through the proxy given by + /// the Location field. + /// </summary> + UseProxy = 305, + /// <summary> + /// Equivalent to status code 306. + /// This status code was used in a previous version of the specification, is no longer used, + /// and is reserved for future use. + /// </summary> + Unused = 306, + /// <summary> + /// <para> + /// Equivalent to status code 307. + /// Indicates that the requested resource is located temporarily under a different URI. + /// </para> + /// <para> + /// TemporaryRedirect is a synonym for RedirectKeepVerb. + /// </para> + /// </summary> + TemporaryRedirect = 307, + /// <summary> + /// <para> + /// Equivalent to status code 307. + /// Indicates that the requested resource is located temporarily under a different URI. + /// </para> + /// <para> + /// RedirectKeepVerb is a synonym for TemporaryRedirect. + /// </para> + /// </summary> + RedirectKeepVerb = 307, + /// <summary> + /// Equivalent to status code 400. + /// Indicates that the client's request couldn't be understood by the server due to + /// malformed syntax. + /// </summary> + BadRequest = 400, + /// <summary> + /// Equivalent to status code 401. + /// Indicates that the client's request requires user authentication. + /// </summary> + Unauthorized = 401, + /// <summary> + /// Equivalent to status code 402. + /// This status code is reserved for future use. + /// </summary> + PaymentRequired = 402, + /// <summary> + /// Equivalent to status code 403. + /// Indicates that the server understood the client's request but is refusing to fulfill it. + /// </summary> + Forbidden = 403, + /// <summary> + /// Equivalent to status code 404. + /// Indicates that the server hasn't found anything matching the request URI. + /// </summary> + NotFound = 404, + /// <summary> + /// Equivalent to status code 405. + /// Indicates that the method specified in the request line isn't allowed for the resource + /// identified by the request URI. + /// </summary> + MethodNotAllowed = 405, + /// <summary> + /// Equivalent to status code 406. + /// Indicates that the server doesn't have the appropriate resource to respond to the Accept + /// headers in the client's request. + /// </summary> + NotAcceptable = 406, + /// <summary> + /// Equivalent to status code 407. + /// Indicates that the client must first authenticate itself with the proxy. + /// </summary> + ProxyAuthenticationRequired = 407, + /// <summary> + /// Equivalent to status code 408. + /// Indicates that the client didn't produce a request within the time that the server was + /// prepared to wait. + /// </summary> + RequestTimeout = 408, + /// <summary> + /// Equivalent to status code 409. + /// Indicates that the client's request couldn't be completed due to a conflict on the server. + /// </summary> + Conflict = 409, + /// <summary> + /// Equivalent to status code 410. + /// Indicates that the requested resource is no longer available at the server and + /// no forwarding address is known. + /// </summary> + Gone = 410, + /// <summary> + /// Equivalent to status code 411. + /// Indicates that the server refuses to accept the client's request without a defined + /// Content-Length. + /// </summary> + LengthRequired = 411, + /// <summary> + /// Equivalent to status code 412. + /// Indicates that the precondition given in one or more of the request headers evaluated to + /// false when it was tested on the server. + /// </summary> + PreconditionFailed = 412, + /// <summary> + /// Equivalent to status code 413. + /// Indicates that the entity of the client's request is larger than the server is willing or + /// able to process. + /// </summary> + RequestEntityTooLarge = 413, + /// <summary> + /// Equivalent to status code 414. + /// Indicates that the request URI is longer than the server is willing to interpret. + /// </summary> + RequestUriTooLong = 414, + /// <summary> + /// Equivalent to status code 415. + /// Indicates that the entity of the client's request is in a format not supported by + /// the requested resource for the requested method. + /// </summary> + UnsupportedMediaType = 415, + /// <summary> + /// Equivalent to status code 416. + /// Indicates that none of the range specifier values in a Range request header overlap + /// the current extent of the selected resource. + /// </summary> + RequestedRangeNotSatisfiable = 416, + /// <summary> + /// Equivalent to status code 417. + /// Indicates that the expectation given in an Expect request header couldn't be met by + /// the server. + /// </summary> + ExpectationFailed = 417, + /// <summary> + /// Equivalent to status code 500. + /// Indicates that the server encountered an unexpected condition which prevented it from + /// fulfilling the client's request. + /// </summary> + InternalServerError = 500, + /// <summary> + /// Equivalent to status code 501. + /// Indicates that the server doesn't support the functionality required to fulfill the client's + /// request. + /// </summary> + NotImplemented = 501, + /// <summary> + /// Equivalent to status code 502. + /// Indicates that a gateway or proxy server received an invalid response from the upstream + /// server. + /// </summary> + BadGateway = 502, + /// <summary> + /// Equivalent to status code 503. + /// Indicates that the server is currently unable to handle the client's request due to + /// a temporary overloading or maintenance of the server. + /// </summary> + ServiceUnavailable = 503, + /// <summary> + /// Equivalent to status code 504. + /// Indicates that a gateway or proxy server didn't receive a timely response from the upstream + /// server or some other auxiliary server. + /// </summary> + GatewayTimeout = 504, + /// <summary> + /// Equivalent to status code 505. + /// Indicates that the server doesn't support the HTTP version used in the client's request. + /// </summary> + HttpVersionNotSupported = 505, + } } diff --git a/SocketHttpListener/Net/HttpStatusDescription.cs b/SocketHttpListener/Net/HttpStatusDescription.cs index 9cc4a8e8c..d0587dff7 100644 --- a/SocketHttpListener/Net/HttpStatusDescription.cs +++ b/SocketHttpListener/Net/HttpStatusDescription.cs @@ -1,9 +1,4 @@ -using System; -using System.Collections.Generic; -using System.Text; -using System.Threading.Tasks; - -namespace SocketHttpListener.Net +namespace SocketHttpListener.Net { internal static class HttpStatusDescription { diff --git a/SocketHttpListener/Net/ListenerPrefix.cs b/SocketHttpListener/Net/ListenerPrefix.cs index 99bb118e5..b29cc5c6d 100644 --- a/SocketHttpListener/Net/ListenerPrefix.cs +++ b/SocketHttpListener/Net/ListenerPrefix.cs @@ -1,6 +1,5 @@ using System; using System.Net; -using MediaBrowser.Model.Net; namespace SocketHttpListener.Net { diff --git a/SocketHttpListener/Net/UriScheme.cs b/SocketHttpListener/Net/UriScheme.cs index 732fc0e7d..0e747154f 100644 --- a/SocketHttpListener/Net/UriScheme.cs +++ b/SocketHttpListener/Net/UriScheme.cs @@ -1,8 +1,4 @@ -using System; -using System.Collections.Generic; -using System.Text; - -namespace SocketHttpListener.Net +namespace SocketHttpListener.Net { internal static class UriScheme { diff --git a/SocketHttpListener/Net/WebHeaderCollection.cs b/SocketHttpListener/Net/WebHeaderCollection.cs index ed3cb921c..8c3395df5 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 { diff --git a/SocketHttpListener/Net/WebHeaderEncoding.cs b/SocketHttpListener/Net/WebHeaderEncoding.cs index 7290bfc63..a269b1eaf 100644 --- a/SocketHttpListener/Net/WebHeaderEncoding.cs +++ b/SocketHttpListener/Net/WebHeaderEncoding.cs @@ -1,7 +1,4 @@ -using System; -using System.Collections.Generic; -using System.Text; -using System.Threading.Tasks; +using System.Text; namespace SocketHttpListener.Net { diff --git a/SocketHttpListener/Net/WebSockets/HttpListenerWebSocketContext.cs b/SocketHttpListener/Net/WebSockets/HttpListenerWebSocketContext.cs index 49375678d..5ed49ec47 100644 --- a/SocketHttpListener/Net/WebSockets/HttpListenerWebSocketContext.cs +++ b/SocketHttpListener/Net/WebSockets/HttpListenerWebSocketContext.cs @@ -1,14 +1,8 @@ using System; using System.Collections.Generic; -using System.Collections.Specialized; -using System.IO; using System.Net; using System.Security.Principal; -using MediaBrowser.Model.Cryptography; -using MediaBrowser.Model.IO; -using MediaBrowser.Model.Net; using MediaBrowser.Model.Services; -using SocketHttpListener.Primitives; namespace SocketHttpListener.Net.WebSockets { diff --git a/SocketHttpListener/Net/WebSockets/HttpWebSocket.Managed.cs b/SocketHttpListener/Net/WebSockets/HttpWebSocket.Managed.cs index 571e4bdba..96b960f7b 100644 --- a/SocketHttpListener/Net/WebSockets/HttpWebSocket.Managed.cs +++ b/SocketHttpListener/Net/WebSockets/HttpWebSocket.Managed.cs @@ -1,6 +1,4 @@ using System; -using System.Collections.Generic; -using System.Text; using System.Threading.Tasks; namespace SocketHttpListener.Net.WebSockets diff --git a/SocketHttpListener/Net/WebSockets/HttpWebSocket.cs b/SocketHttpListener/Net/WebSockets/HttpWebSocket.cs index f72a139f3..4667275c5 100644 --- a/SocketHttpListener/Net/WebSockets/HttpWebSocket.cs +++ b/SocketHttpListener/Net/WebSockets/HttpWebSocket.cs @@ -1,8 +1,7 @@ using System; -using System.Collections.Generic; -using System.Text; using System.Diagnostics.CodeAnalysis; using System.Security.Cryptography; +using System.Text; using System.Threading; namespace SocketHttpListener.Net.WebSockets diff --git a/SocketHttpListener/Net/WebSockets/WebSocketCloseStatus.cs b/SocketHttpListener/Net/WebSockets/WebSocketCloseStatus.cs index b83b6cd0f..451b16ec3 100644 --- a/SocketHttpListener/Net/WebSockets/WebSocketCloseStatus.cs +++ b/SocketHttpListener/Net/WebSockets/WebSocketCloseStatus.cs @@ -1,8 +1,4 @@ -using System; -using System.Collections.Generic; -using System.Text; - -namespace SocketHttpListener.Net.WebSockets +namespace SocketHttpListener.Net.WebSockets { public enum WebSocketCloseStatus { diff --git a/SocketHttpListener/Net/WebSockets/WebSocketContext.cs b/SocketHttpListener/Net/WebSockets/WebSocketContext.cs index 071b5fe05..10ad86439 100644 --- a/SocketHttpListener/Net/WebSockets/WebSocketContext.cs +++ b/SocketHttpListener/Net/WebSockets/WebSocketContext.cs @@ -1,9 +1,7 @@ using System; using System.Collections.Generic; -using System.Collections.Specialized; using System.Net; using System.Security.Principal; -using MediaBrowser.Model.Net; using MediaBrowser.Model.Services; namespace SocketHttpListener.Net.WebSockets diff --git a/SocketHttpListener/Net/WebSockets/WebSocketValidate.cs b/SocketHttpListener/Net/WebSockets/WebSocketValidate.cs index 00895ea01..2f1b428ab 100644 --- a/SocketHttpListener/Net/WebSockets/WebSocketValidate.cs +++ b/SocketHttpListener/Net/WebSockets/WebSocketValidate.cs @@ -1,8 +1,6 @@ using System; -using System.Collections.Generic; -using System.Text; -using MediaBrowser.Model.Net; using System.Globalization; +using System.Text; using WebSocketState = System.Net.WebSockets.WebSocketState; namespace SocketHttpListener.Net.WebSockets |
