Refactored HttpStatusCode.cs

This commit is contained in:
sta 2014-04-02 17:26:49 +09:00
parent 0cb2335b48
commit 0ef002be52

View File

@ -1,363 +1,359 @@
// #region License
// HttpStatusCode.cs /*
// Copied from System.Net.HttpStatusCode.cs * HttpStatusCode.cs
// *
// This code was automatically generated from * This code is derived from System.Net.HttpStatusCode.cs of Mono
// ECMA CLI XML Library Specification. * (http://www.mono-project.com).
// Generator: libgen.xsl [1.0; (C) Sergey Chaban (serge@wildwestsoftware.com)] *
// Created: Wed, 5 Sep 2001 06:32:05 UTC * This code was automatically generated from ECMA CLI XML Library Specification.
// Source file: AllTypes.xml * Generator: libgen.xsl [1.0; (C) Sergey Chaban (serge@wildwestsoftware.com)]
// URL: http://msdn.microsoft.com/net/ecma/AllTypes.xml * Created: Wed, 5 Sep 2001 06:32:05 UTC
// * Source file: AllTypes.xml
// Copyright (C) 2001 Ximian, Inc. (http://www.ximian.com) * URL: http://msdn.microsoft.com/net/ecma/AllTypes.xml
// *
// Permission is hereby granted, free of charge, to any person obtaining * The MIT License
// a copy of this software and associated documentation files (the *
// "Software"), to deal in the Software without restriction, including * Copyright (c) 2001 Ximian, Inc. (http://www.ximian.com)
// without limitation the rights to use, copy, modify, merge, publish, * Copyright (c) 2012-2014 sta.blockhead
// distribute, sublicense, and/or sell copies of the Software, and to *
// permit persons to whom the Software is furnished to do so, subject to * Permission is hereby granted, free of charge, to any person obtaining a copy
// the following conditions: * of this software and associated documentation files (the "Software"), to deal
// * in the Software without restriction, including without limitation the rights
// The above copyright notice and this permission notice shall be * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
// included in all copies or substantial portions of the Software. * copies of the Software, and to permit persons to whom the Software is
// * furnished to do so, subject to the following conditions:
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, *
// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF * The above copyright notice and this permission notice shall be included in
// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND * all copies or substantial portions of the Software.
// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE *
// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
// * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
* THE SOFTWARE.
*/
#endregion
namespace WebSocketSharp.Net { namespace WebSocketSharp.Net
{
/// <summary> /// <summary>
/// Contains the values of the HTTP status codes. /// Contains the values of the HTTP status codes.
/// </summary> /// </summary>
/// <remarks> /// <remarks>
/// The HttpStatusCode enumeration contains the values of the HTTP status codes defined in /// 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. /// <see href="http://tools.ietf.org/html/rfc2616#section-10">RFC 2616</see> for HTTP 1.1.
/// </remarks> /// </remarks>
public enum HttpStatusCode { public enum HttpStatusCode
{
/// <summary> /// <summary>
/// Equivalent to status code 100. Indicates that the client should continue with its request. /// Equivalent to status code 100.
/// </summary> /// Indicates that the client should continue with its request.
Continue = 100, /// </summary>
Continue = 100,
/// <summary> /// <summary>
/// Equivalent to status code 101. Indicates that the server is switching the HTTP version or protocol on the connection. /// Equivalent to status code 101.
/// </summary> /// Indicates that the server is switching the HTTP version or protocol on the connection.
SwitchingProtocols = 101, /// </summary>
SwitchingProtocols = 101,
/// <summary> /// <summary>
/// Equivalent to status code 200. Indicates that the client's request has succeeded. /// Equivalent to status code 200.
/// </summary> /// Indicates that the client's request has succeeded.
OK = 200, /// </summary>
OK = 200,
/// <summary> /// <summary>
/// Equivalent to status code 201. Indicates that the client's request has been fulfilled /// Equivalent to status code 201.
/// and resulted in a new resource being created. /// Indicates that the client's request has been fulfilled and resulted in a new resource being
/// </summary> /// created.
Created = 201, /// </summary>
Created = 201,
/// <summary> /// <summary>
/// Equivalent to status code 202. Indicates that the client's request has been accepted for processing, /// Equivalent to status code 202.
/// but the processing has not been completed. /// Indicates that the client's request has been accepted for processing, but the processing
/// </summary> /// hasn't been completed.
Accepted = 202, /// </summary>
Accepted = 202,
/// <summary> /// <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. /// Equivalent to status code 203.
/// </summary> /// Indicates that the returned metainformation is from a local or a third-party copy instead of
NonAuthoritativeInformation = 203, /// the origin server.
/// </summary>
/// <summary> NonAuthoritativeInformation = 203,
/// Equivalent to status code 204. Indicates that the server has fulfilled the client's request /// <summary>
/// but does not need to return an entity-body. /// Equivalent to status code 204.
/// </summary> /// Indicates that the server has fulfilled the client's request but doesn't need to return
NoContent = 204, /// an entity-body.
/// </summary>
/// <summary> NoContent = 204,
/// Equivalent to status code 205. Indicates that the server has fulfilled the client's request /// <summary>
/// and the user agent should reset the document view which caused the request to be sent. /// Equivalent to status code 205.
/// </summary> /// Indicates that the server has fulfilled the client's request, and the user agent should
ResetContent = 205, /// reset the document view which caused the request to be sent.
/// </summary>
/// <summary> ResetContent = 205,
/// Equivalent to status code 206. Indicates that the server has fulfilled the partial GET request for the resource. /// <summary>
/// </summary> /// Equivalent to status code 206.
PartialContent = 206, /// Indicates that the server has fulfilled the partial GET request for the resource.
/// </summary>
/// <summary> PartialContent = 206,
/// <para> /// <summary>
/// Equivalent to status code 300. Indicates that the requested resource corresponds to /// <para>
/// any one of multiple representations. /// Equivalent to status code 300.
/// </para> /// Indicates that the requested resource corresponds to any of multiple representations.
/// <para> /// </para>
/// MultipleChoices is a synonym for Ambiguous. /// <para>
/// </para> /// MultipleChoices is a synonym for Ambiguous.
/// </summary> /// </para>
MultipleChoices = 300, /// </summary>
MultipleChoices = 300,
/// <summary> /// <summary>
/// <para> /// <para>
/// Equivalent to status code 300. Indicates that the requested resource corresponds to /// Equivalent to status code 300.
/// any one of multiple representations. /// Indicates that the requested resource corresponds to any of multiple representations.
/// </para> /// </para>
/// <para> /// <para>
/// Ambiguous is a synonym for MultipleChoices. /// Ambiguous is a synonym for MultipleChoices.
/// </para> /// </para>
/// </summary> /// </summary>
Ambiguous = 300, Ambiguous = 300,
/// <summary>
/// <summary> /// <para>
/// <para> /// Equivalent to status code 301.
/// Equivalent to status code 301. Indicates that the requested resource has been assigned a new permanent URI /// Indicates that the requested resource has been assigned a new permanent URI and
/// and any future references to this resource should use one of the returned URIs. /// any future references to this resource should use one of the returned URIs.
/// </para> /// </para>
/// <para> /// <para>
/// MovedPermanently is a synonym for Moved. /// MovedPermanently is a synonym for Moved.
/// </para> /// </para>
/// </summary> /// </summary>
MovedPermanently = 301, MovedPermanently = 301,
/// <summary>
/// <summary> /// <para>
/// <para> /// Equivalent to status code 301.
/// Equivalent to status code 301. Indicates that the requested resource has been assigned a new permanent URI /// Indicates that the requested resource has been assigned a new permanent URI and
/// and any future references to this resource should use one of the returned URIs. /// any future references to this resource should use one of the returned URIs.
/// </para> /// </para>
/// <para> /// <para>
/// Moved is a synonym for MovedPermanently. /// Moved is a synonym for MovedPermanently.
/// </para> /// </para>
/// </summary> /// </summary>
Moved = 301, Moved = 301,
/// <summary>
/// <summary> /// <para>
/// <para> /// Equivalent to status code 302.
/// Equivalent to status code 302. Indicates that the requested resource is located temporarily /// Indicates that the requested resource is located temporarily under a different URI.
/// under a different URI. /// </para>
/// </para> /// <para>
/// <para> /// Found is a synonym for Redirect.
/// Found is a synonym for Redirect. /// </para>
/// </para> /// </summary>
/// </summary> Found = 302,
Found = 302, /// <summary>
/// <para>
/// <summary> /// Equivalent to status code 302.
/// <para> /// Indicates that the requested resource is located temporarily under a different URI.
/// Equivalent to status code 302. Indicates that the requested resource is located temporarily /// </para>
/// under a different URI. /// <para>
/// </para> /// Redirect is a synonym for Found.
/// <para> /// </para>
/// Redirect is a synonym for Found. /// </summary>
/// </para> Redirect = 302,
/// </summary> /// <summary>
Redirect = 302, /// <para>
/// Equivalent to status code 303.
/// <summary> /// Indicates that the response to the request can be found under a different URI and
/// <para> /// should be retrieved using a GET method on that resource.
/// Equivalent to status code 303. Indicates that the response to the request can be found /// </para>
/// under a different URI and should be retrieved using a GET method on that resource. /// <para>
/// </para> /// SeeOther is a synonym for RedirectMethod.
/// <para> /// </para>
/// SeeOther is a synonym for RedirectMethod. /// </summary>
/// </para> SeeOther = 303,
/// </summary> /// <summary>
SeeOther = 303, /// <para>
/// Equivalent to status code 303.
/// <summary> /// Indicates that the response to the request can be found under a different URI and
/// <para> /// should be retrieved using a GET method on that resource.
/// Equivalent to status code 303. Indicates that the response to the request can be found /// </para>
/// under a different URI and should be retrieved using a GET method on that resource. /// <para>
/// </para> /// RedirectMethod is a synonym for SeeOther.
/// <para> /// </para>
/// RedirectMethod is a synonym for SeeOther. /// </summary>
/// </para> RedirectMethod = 303,
/// </summary> /// <summary>
RedirectMethod = 303, /// Equivalent to status code 304.
/// Indicates that the client has performed a conditional GET request and access is allowed,
/// <summary> /// but the document hasn't been modified.
/// Equivalent to status code 304. Indicates that the client has performed a conditional GET request /// </summary>
/// and access is allowed, but the document has not been modified. NotModified = 304,
/// </summary> /// <summary>
NotModified = 304, /// Equivalent to status code 305.
/// Indicates that the requested resource must be accessed through the proxy given by
/// <summary> /// the Location field.
/// Equivalent to status code 305. Indicates that the requested resource must be accessed /// </summary>
/// through the proxy given by the Location field. UseProxy = 305,
/// </summary> /// <summary>
UseProxy = 305, /// Equivalent to status code 306.
/// This status code was used in a previous version of the specification, is no longer used,
/// <summary> /// and is reserved for future use.
/// Equivalent to status code 306. This code was used in a previous version of the specification, /// </summary>
/// is no longer used, and is reserved for future use. Unused = 306,
/// </summary> /// <summary>
Unused = 306, /// <para>
/// Equivalent to status code 307.
/// <summary> /// Indicates that the requested resource is located temporarily under a different URI.
/// <para> /// </para>
/// Equivalent to status code 307. Indicates that the requested resource is located temporarily /// <para>
/// under a different URI. /// TemporaryRedirect is a synonym for RedirectKeepVerb.
/// </para> /// </para>
/// <para> /// </summary>
/// TemporaryRedirect is a synonym for RedirectKeepVerb. TemporaryRedirect = 307,
/// </para> /// <summary>
/// </summary> /// <para>
TemporaryRedirect = 307, /// Equivalent to status code 307.
/// Indicates that the requested resource is located temporarily under a different URI.
/// <summary> /// </para>
/// <para> /// <para>
/// Equivalent to status code 307. Indicates that the requested resource is located temporarily /// RedirectKeepVerb is a synonym for TemporaryRedirect.
/// under a different URI. /// </para>
/// </para> /// </summary>
/// <para> RedirectKeepVerb = 307,
/// RedirectKeepVerb is a synonym for TemporaryRedirect. /// <summary>
/// </para> /// Equivalent to status code 400.
/// </summary> /// Indicates that the client's request couldn't be understood by the server due to
RedirectKeepVerb = 307, /// malformed syntax.
/// </summary>
/// <summary> BadRequest = 400,
/// Equivalent to status code 400. Indicates that the client's request could not be understood /// <summary>
/// by the server due to malformed syntax. /// Equivalent to status code 401.
/// </summary> /// Indicates that the client's request requires user authentication.
BadRequest = 400, /// </summary>
Unauthorized = 401,
/// <summary> /// <summary>
/// Equivalent to status code 401. Indicates that the client's request requires user authentication. /// Equivalent to status code 402.
/// </summary> /// This status code is reserved for future use.
Unauthorized = 401, /// </summary>
PaymentRequired = 402,
/// <summary> /// <summary>
/// Equivalent to status code 402. This code is reserved for future use. /// Equivalent to status code 403.
/// </summary> /// Indicates that the server understood the client's request but is refusing to fulfill it.
PaymentRequired = 402, /// </summary>
Forbidden = 403,
/// <summary> /// <summary>
/// Equivalent to status code 403. Indicates that the server understood the client's request /// Equivalent to status code 404.
/// but is refusing to fulfill it. /// Indicates that the server hasn't found anything matching the request URI.
/// </summary> /// </summary>
Forbidden = 403, NotFound = 404,
/// <summary>
/// <summary> /// Equivalent to status code 405.
/// Equivalent to status code 404. Indicates that the server has not found anything /// Indicates that the method specified in the request line isn't allowed for the resource
/// matching the request URI. /// identified by the request URI.
/// </summary> /// </summary>
NotFound = 404, MethodNotAllowed = 405,
/// <summary>
/// <summary> /// Equivalent to status code 406.
/// Equivalent to status code 405. Indicates that the method specified in the request line /// Indicates that the server doesn't have the appropriate resource to respond to the accept
/// is not allowed for the resource identified by the request URI. /// headers in the client's request.
/// </summary> /// </summary>
MethodNotAllowed = 405, NotAcceptable = 406,
/// <summary>
/// <summary> /// Equivalent to status code 407.
/// Equivalent to status code 406. Indicates that the server does not have the appropriate resource /// Indicates that the client must first authenticate itself with the proxy.
/// to respond to the accept headers in the client's request. /// </summary>
/// </summary> ProxyAuthenticationRequired = 407,
NotAcceptable = 406, /// <summary>
/// Equivalent to status code 408.
/// <summary> /// Indicates that the client didn't produce a request within the time that the server was
/// Equivalent to status code 407. Indicates that the client must first authenticate itself with the proxy. /// prepared to wait.
/// </summary> /// </summary>
ProxyAuthenticationRequired = 407, RequestTimeout = 408,
/// <summary>
/// <summary> /// Equivalent to status code 409.
/// Equivalent to status code 408. Indicates that the client did not produce a request /// Indicates that the client's request couldn't be completed due to a conflict on the server.
/// within the time that the server was prepared to wait. /// </summary>
/// </summary> Conflict = 409,
RequestTimeout = 408, /// <summary>
/// Equivalent to status code 410.
/// <summary> /// Indicates that the requested resource is no longer available at the server and
/// Equivalent to status code 409. Indicates that the client's request could not be completed /// no forwarding address is known.
/// due to a conflict on the server. /// </summary>
/// </summary> Gone = 410,
Conflict = 409, /// <summary>
/// Equivalent to status code 411.
/// <summary> /// Indicates that the server refuses to accept the client's request without a defined
/// Equivalent to status code 410. Indicates that the requested resource is no longer available /// Content-Length.
/// at the server and no forwarding address is known. /// </summary>
/// </summary> LengthRequired = 411,
Gone = 410, /// <summary>
/// Equivalent to status code 412.
/// <summary> /// Indicates that the precondition given in one or more of the request header fields
/// Equivalent to status code 411. Indicates that the server refuses to accept the client's request /// evaluated to false when it was tested on the server.
/// without a defined Content-Length. /// </summary>
/// </summary> PreconditionFailed = 412,
LengthRequired = 411, /// <summary>
/// Equivalent to status code 413.
/// <summary> /// Indicates that the entity of the client's request is larger than the server is willing or
/// Equivalent to status code 412. Indicates that the precondition given in one or more of the request header fields /// able to process.
/// evaluated to false when it was tested on the server. /// </summary>
/// </summary> RequestEntityTooLarge = 413,
PreconditionFailed = 412, /// <summary>
/// Equivalent to status code 414.
/// <summary> /// Indicates that the request URI is longer than the server is willing to interpret.
/// Equivalent to status code 413. Indicates that the client's request entity is larger /// </summary>
/// than the server is willing or able to process. RequestUriTooLong = 414,
/// </summary> /// <summary>
RequestEntityTooLarge = 413, /// Equivalent to status code 415.
/// Indicates that the entity of the client's request is in a format not supported by
/// <summary> /// the requested resource for the requested method.
/// Equivalent to status code 414. Indicates that the request URI is longer /// </summary>
/// than the server is willing to interpret. UnsupportedMediaType = 415,
/// </summary> /// <summary>
RequestUriTooLong = 414, /// Equivalent to status code 416.
/// Indicates that none of the range specifier values in a Range request header field
/// <summary> /// overlap the current extent of the selected resource.
/// Equivalent to status code 415. Indicates that the entity of the client's request is in a format /// </summary>
/// not supported by the requested resource for the requested method. RequestedRangeNotSatisfiable = 416,
/// </summary> /// <summary>
UnsupportedMediaType = 415, /// Equivalent to status code 417.
/// Indicates that the expectation given in an Expect request header field couldn't be met by
/// <summary> /// the server.
/// Equivalent to status code 416. Indicates that none of the range specifier values in a Range request header field /// </summary>
/// overlap the current extent of the selected resource. ExpectationFailed = 417,
/// </summary> /// <summary>
RequestedRangeNotSatisfiable = 416, /// Equivalent to status code 500.
/// Indicates that the server encountered an unexpected condition which prevented it from
/// <summary> /// fulfilling the client's request.
/// Equivalent to status code 417. Indicates that the expectation given in an Expect request header field /// </summary>
/// could not be met by the server. InternalServerError = 500,
/// </summary> /// <summary>
ExpectationFailed = 417, /// Equivalent to status code 501.
/// Indicates that the server doesn't support the functionality required to fulfill the client's
/// <summary> /// request.
/// Equivalent to status code 500. Indicates that the server encountered an unexpected condition /// </summary>
/// which prevented it from fulfilling the client's request. NotImplemented = 501,
/// </summary> /// <summary>
InternalServerError = 500, /// Equivalent to status code 502.
/// Indicates that a gateway or proxy server received an invalid response from the upstream
/// <summary> /// server.
/// Equivalent to status code 501. Indicates that the server does not support the functionality /// </summary>
/// required to fulfill the client's request. BadGateway = 502,
/// </summary> /// <summary>
NotImplemented = 501, /// Equivalent to status code 503.
/// Indicates that the server is currently unable to handle the client's request due to
/// <summary> /// a temporary overloading or maintenance of the server.
/// Equivalent to status code 502. Indicates that a gateway or proxy server received an invalid response /// </summary>
/// from the upstream server. ServiceUnavailable = 503,
/// </summary> /// <summary>
BadGateway = 502, /// Equivalent to status code 504.
/// Indicates that a gateway or proxy server didn't receive a timely response from the upstream
/// <summary> /// server or some other auxiliary server.
/// Equivalent to status code 503. Indicates that the server is currently unable to handle the client's request /// </summary>
/// due to a temporary overloading or maintenance of the server. GatewayTimeout = 504,
/// </summary> /// <summary>
ServiceUnavailable = 503, /// Equivalent to status code 505.
/// Indicates that the server doesn't support the HTTP version used in the client's request.
/// <summary> /// </summary>
/// Equivalent to status code 504. Indicates that a gateway or proxy server did not receive a timely response HttpVersionNotSupported = 505,
/// from the upstream server or some other auxiliary server. }
/// </summary>
GatewayTimeout = 504,
/// <summary>
/// Equivalent to status code 505. Indicates that the server does not support the HTTP version
/// used in the client's request.
/// </summary>
HttpVersionNotSupported = 505,
}
} }