Refactored HttpStatusCode.cs

master
sta 12 years ago
parent 0cb2335b48
commit 0ef002be52

@ -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,
namespace WebSocketSharp.Net { * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
* THE SOFTWARE.
/// <summary> */
/// Contains the values of the HTTP status codes. #endregion
/// </summary>
/// <remarks> namespace WebSocketSharp.Net
/// 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. /// <summary>
/// </remarks> /// Contains the values of the HTTP status codes.
public enum HttpStatusCode { /// </summary>
/// <remarks>
/// <summary> /// The HttpStatusCode enumeration contains the values of the HTTP status codes defined in
/// Equivalent to status code 100. Indicates that the client should continue with its request. /// <see href="http://tools.ietf.org/html/rfc2616#section-10">RFC 2616</see> for HTTP 1.1.
/// </summary> /// </remarks>
Continue = 100, public enum HttpStatusCode
{
/// <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 100.
/// </summary> /// Indicates that the client should continue with its request.
SwitchingProtocols = 101, /// </summary>
Continue = 100,
/// <summary> /// <summary>
/// Equivalent to status code 200. Indicates that the client's request has succeeded. /// Equivalent to status code 101.
/// </summary> /// Indicates that the server is switching the HTTP version or protocol on the connection.
OK = 200, /// </summary>
SwitchingProtocols = 101,
/// <summary> /// <summary>
/// Equivalent to status code 201. Indicates that the client's request has been fulfilled /// Equivalent to status code 200.
/// and resulted in a new resource being created. /// Indicates that the client's request has succeeded.
/// </summary> /// </summary>
Created = 201, OK = 200,
/// <summary>
/// <summary> /// Equivalent to status code 201.
/// Equivalent to status code 202. Indicates that the client's request has been accepted for processing, /// Indicates that the client's request has been fulfilled and resulted in a new resource being
/// but the processing has not been completed. /// created.
/// </summary> /// </summary>
Accepted = 202, Created = 201,
/// <summary>
/// <summary> /// Equivalent to status code 202.
/// Equivalent to status code 203. Indicates that the returned metainformation is from a local or a third-party copy instead of the origin server. /// Indicates that the client's request has been accepted for processing, but the processing
/// </summary> /// hasn't been completed.
NonAuthoritativeInformation = 203, /// </summary>
Accepted = 202,
/// <summary> /// <summary>
/// Equivalent to status code 204. Indicates that the server has fulfilled the client's request /// Equivalent to status code 203.
/// but does not need to return an entity-body. /// Indicates that the returned metainformation is from a local or a third-party copy instead of
/// </summary> /// the origin server.
NoContent = 204, /// </summary>
NonAuthoritativeInformation = 203,
/// <summary> /// <summary>
/// Equivalent to status code 205. Indicates that the server has fulfilled the client's request /// Equivalent to status code 204.
/// and the user agent should reset the document view which caused the request to be sent. /// Indicates that the server has fulfilled the client's request but doesn't need to return
/// </summary> /// an entity-body.
ResetContent = 205, /// </summary>
NoContent = 204,
/// <summary> /// <summary>
/// Equivalent to status code 206. Indicates that the server has fulfilled the partial GET request for the resource. /// Equivalent to status code 205.
/// </summary> /// Indicates that the server has fulfilled the client's request, and the user agent should
PartialContent = 206, /// reset the document view which caused the request to be sent.
/// </summary>
/// <summary> ResetContent = 205,
/// <para> /// <summary>
/// Equivalent to status code 300. Indicates that the requested resource corresponds to /// Equivalent to status code 206.
/// any one of multiple representations. /// Indicates that the server has fulfilled the partial GET request for the resource.
/// </para> /// </summary>
/// <para> PartialContent = 206,
/// MultipleChoices is a synonym for Ambiguous. /// <summary>
/// </para> /// <para>
/// </summary> /// Equivalent to status code 300.
MultipleChoices = 300, /// Indicates that the requested resource corresponds to any of multiple representations.
/// </para>
/// <summary> /// <para>
/// <para> /// MultipleChoices is a synonym for Ambiguous.
/// Equivalent to status code 300. Indicates that the requested resource corresponds to /// </para>
/// any one of multiple representations. /// </summary>
/// </para> MultipleChoices = 300,
/// <para> /// <summary>
/// Ambiguous is a synonym for MultipleChoices. /// <para>
/// </para> /// Equivalent to status code 300.
/// </summary> /// Indicates that the requested resource corresponds to any of multiple representations.
Ambiguous = 300, /// </para>
/// <para>
/// <summary> /// Ambiguous is a synonym for MultipleChoices.
/// <para> /// </para>
/// Equivalent to status code 301. Indicates that the requested resource has been assigned a new permanent URI /// </summary>
/// and any future references to this resource should use one of the returned URIs. Ambiguous = 300,
/// </para> /// <summary>
/// <para> /// <para>
/// MovedPermanently is a synonym for Moved. /// Equivalent to status code 301.
/// </para> /// Indicates that the requested resource has been assigned a new permanent URI and
/// </summary> /// any future references to this resource should use one of the returned URIs.
MovedPermanently = 301, /// </para>
/// <para>
/// <summary> /// MovedPermanently is a synonym for Moved.
/// <para> /// </para>
/// Equivalent to status code 301. Indicates that the requested resource has been assigned a new permanent URI /// </summary>
/// and any future references to this resource should use one of the returned URIs. MovedPermanently = 301,
/// </para> /// <summary>
/// <para> /// <para>
/// Moved is a synonym for MovedPermanently. /// Equivalent to status code 301.
/// </para> /// Indicates that the requested resource has been assigned a new permanent URI and
/// </summary> /// any future references to this resource should use one of the returned URIs.
Moved = 301, /// </para>
/// <para>
/// <summary> /// Moved is a synonym for MovedPermanently.
/// <para> /// </para>
/// Equivalent to status code 302. Indicates that the requested resource is located temporarily /// </summary>
/// under a different URI. Moved = 301,
/// </para> /// <summary>
/// <para> /// <para>
/// Found is a synonym for Redirect. /// Equivalent to status code 302.
/// </para> /// Indicates that the requested resource is located temporarily under a different URI.
/// </summary> /// </para>
Found = 302, /// <para>
/// Found is a synonym for Redirect.
/// <summary> /// </para>
/// <para> /// </summary>
/// Equivalent to status code 302. Indicates that the requested resource is located temporarily Found = 302,
/// under a different URI. /// <summary>
/// </para> /// <para>
/// <para> /// Equivalent to status code 302.
/// Redirect is a synonym for Found. /// Indicates that the requested resource is located temporarily under a different URI.
/// </para> /// </para>
/// </summary> /// <para>
Redirect = 302, /// Redirect is a synonym for Found.
/// </para>
/// <summary> /// </summary>
/// <para> Redirect = 302,
/// Equivalent to status code 303. Indicates that the response to the request can be found /// <summary>
/// under a different URI and should be retrieved using a GET method on that resource. /// <para>
/// </para> /// Equivalent to status code 303.
/// <para> /// Indicates that the response to the request can be found under a different URI and
/// SeeOther is a synonym for RedirectMethod. /// should be retrieved using a GET method on that resource.
/// </para> /// </para>
/// </summary> /// <para>
SeeOther = 303, /// SeeOther is a synonym for RedirectMethod.
/// </para>
/// <summary> /// </summary>
/// <para> SeeOther = 303,
/// Equivalent to status code 303. Indicates that the response to the request can be found /// <summary>
/// under a different URI and should be retrieved using a GET method on that resource. /// <para>
/// </para> /// Equivalent to status code 303.
/// <para> /// Indicates that the response to the request can be found under a different URI and
/// RedirectMethod is a synonym for SeeOther. /// should be retrieved using a GET method on that resource.
/// </para> /// </para>
/// </summary> /// <para>
RedirectMethod = 303, /// RedirectMethod is a synonym for SeeOther.
/// </para>
/// <summary> /// </summary>
/// Equivalent to status code 304. Indicates that the client has performed a conditional GET request RedirectMethod = 303,
/// and access is allowed, but the document has not been modified. /// <summary>
/// </summary> /// Equivalent to status code 304.
NotModified = 304, /// Indicates that the client has performed a conditional GET request and access is allowed,
/// but the document hasn't been modified.
/// <summary> /// </summary>
/// Equivalent to status code 305. Indicates that the requested resource must be accessed NotModified = 304,
/// through the proxy given by the Location field. /// <summary>
/// </summary> /// Equivalent to status code 305.
UseProxy = 305, /// Indicates that the requested resource must be accessed through the proxy given by
/// the Location field.
/// <summary> /// </summary>
/// Equivalent to status code 306. This code was used in a previous version of the specification, UseProxy = 305,
/// is no longer used, and is reserved for future use. /// <summary>
/// </summary> /// Equivalent to status code 306.
Unused = 306, /// This status code was used in a previous version of the specification, is no longer used,
/// and is reserved for future use.
/// <summary> /// </summary>
/// <para> Unused = 306,
/// Equivalent to status code 307. Indicates that the requested resource is located temporarily /// <summary>
/// under a different URI. /// <para>
/// </para> /// Equivalent to status code 307.
/// <para> /// Indicates that the requested resource is located temporarily 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> TemporaryRedirect = 307,
/// <para> /// <summary>
/// Equivalent to status code 307. Indicates that the requested resource is located temporarily /// <para>
/// under a different URI. /// Equivalent to status code 307.
/// </para> /// Indicates that the requested resource is located temporarily under a different URI.
/// <para> /// </para>
/// RedirectKeepVerb is a synonym for TemporaryRedirect. /// <para>
/// </para> /// RedirectKeepVerb is a synonym for TemporaryRedirect.
/// </summary> /// </para>
RedirectKeepVerb = 307, /// </summary>
RedirectKeepVerb = 307,
/// <summary> /// <summary>
/// Equivalent to status code 400. Indicates that the client's request could not be understood /// Equivalent to status code 400.
/// by the server due to malformed syntax. /// Indicates that the client's request couldn't be understood by the server due to
/// </summary> /// malformed syntax.
BadRequest = 400, /// </summary>
BadRequest = 400,
/// <summary> /// <summary>
/// Equivalent to status code 401. Indicates that the client's request requires user authentication. /// Equivalent to status code 401.
/// </summary> /// Indicates that the client's request requires user authentication.
Unauthorized = 401, /// </summary>
Unauthorized = 401,
/// <summary> /// <summary>
/// Equivalent to status code 402. This code is reserved for future use. /// Equivalent to status code 402.
/// </summary> /// This status code is reserved for future use.
PaymentRequired = 402, /// </summary>
PaymentRequired = 402,
/// <summary> /// <summary>
/// Equivalent to status code 403. Indicates that the server understood the client's request /// Equivalent to status code 403.
/// but is refusing to fulfill it. /// Indicates that the server understood the client's request but is refusing to fulfill it.
/// </summary> /// </summary>
Forbidden = 403, Forbidden = 403,
/// <summary>
/// <summary> /// Equivalent to status code 404.
/// Equivalent to status code 404. Indicates that the server has not found anything /// Indicates that the server hasn't found anything matching the request URI.
/// matching the request URI. /// </summary>
/// </summary> NotFound = 404,
NotFound = 404, /// <summary>
/// Equivalent to status code 405.
/// <summary> /// Indicates that the method specified in the request line isn't allowed for the resource
/// Equivalent to status code 405. Indicates that the method specified in the request line /// identified by the request URI.
/// is not allowed for the resource identified by the request URI. /// </summary>
/// </summary> MethodNotAllowed = 405,
MethodNotAllowed = 405, /// <summary>
/// Equivalent to status code 406.
/// <summary> /// Indicates that the server doesn't have the appropriate resource to respond to the accept
/// Equivalent to status code 406. Indicates that the server does not have the appropriate resource /// headers in the client's request.
/// to respond to the accept headers in the client's request. /// </summary>
/// </summary> NotAcceptable = 406,
NotAcceptable = 406, /// <summary>
/// Equivalent to status code 407.
/// <summary> /// Indicates that the client must first authenticate itself with the proxy.
/// Equivalent to status code 407. Indicates that the client must first authenticate itself with the proxy. /// </summary>
/// </summary> ProxyAuthenticationRequired = 407,
ProxyAuthenticationRequired = 407, /// <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 408. Indicates that the client did not produce a request /// prepared to wait.
/// within the time that the server was prepared to wait. /// </summary>
/// </summary> RequestTimeout = 408,
RequestTimeout = 408, /// <summary>
/// Equivalent to status code 409.
/// <summary> /// Indicates that the client's request couldn't be completed due to a conflict on the server.
/// Equivalent to status code 409. Indicates that the client's request could not be completed /// </summary>
/// due to a conflict on the server. Conflict = 409,
/// </summary> /// <summary>
Conflict = 409, /// Equivalent to status code 410.
/// Indicates that the requested resource is no longer available at the server and
/// <summary> /// no forwarding address is known.
/// Equivalent to status code 410. Indicates that the requested resource is no longer available /// </summary>
/// at the server and no forwarding address is known. Gone = 410,
/// </summary> /// <summary>
Gone = 410, /// Equivalent to status code 411.
/// Indicates that the server refuses to accept the client's request without a defined
/// <summary> /// Content-Length.
/// Equivalent to status code 411. Indicates that the server refuses to accept the client's request /// </summary>
/// without a defined Content-Length. LengthRequired = 411,
/// </summary> /// <summary>
LengthRequired = 411, /// Equivalent to status code 412.
/// Indicates that the precondition given in one or more of the request header fields
/// <summary> /// evaluated to false when it was tested on the server.
/// Equivalent to status code 412. Indicates that the precondition given in one or more of the request header fields /// </summary>
/// evaluated to false when it was tested on the server. PreconditionFailed = 412,
/// </summary> /// <summary>
PreconditionFailed = 412, /// Equivalent to status code 413.
/// Indicates that the entity of the client's request is larger than the server is willing or
/// <summary> /// able to process.
/// Equivalent to status code 413. Indicates that the client's request entity is larger /// </summary>
/// than the server is willing or able to process. RequestEntityTooLarge = 413,
/// </summary> /// <summary>
RequestEntityTooLarge = 413, /// Equivalent to status code 414.
/// Indicates that the request URI is longer than the server is willing to interpret.
/// <summary> /// </summary>
/// Equivalent to status code 414. Indicates that the request URI is longer RequestUriTooLong = 414,
/// than the server is willing to interpret. /// <summary>
/// </summary> /// Equivalent to status code 415.
RequestUriTooLong = 414, /// Indicates that the entity of the client's request is in a format not supported by
/// the requested resource for the requested method.
/// <summary> /// </summary>
/// Equivalent to status code 415. Indicates that the entity of the client's request is in a format UnsupportedMediaType = 415,
/// not supported by the requested resource for the requested method. /// <summary>
/// </summary> /// Equivalent to status code 416.
UnsupportedMediaType = 415, /// Indicates that none of the range specifier values in a Range request header field
/// overlap the current extent of the selected resource.
/// <summary> /// </summary>
/// Equivalent to status code 416. Indicates that none of the range specifier values in a Range request header field RequestedRangeNotSatisfiable = 416,
/// overlap the current extent of the selected resource. /// <summary>
/// </summary> /// Equivalent to status code 417.
RequestedRangeNotSatisfiable = 416, /// Indicates that the expectation given in an Expect request header field couldn't be met by
/// the server.
/// <summary> /// </summary>
/// Equivalent to status code 417. Indicates that the expectation given in an Expect request header field ExpectationFailed = 417,
/// could not be met by the server. /// <summary>
/// </summary> /// Equivalent to status code 500.
ExpectationFailed = 417, /// Indicates that the server encountered an unexpected condition which prevented it from
/// fulfilling the client's request.
/// <summary> /// </summary>
/// Equivalent to status code 500. Indicates that the server encountered an unexpected condition InternalServerError = 500,
/// which prevented it from fulfilling the client's request. /// <summary>
/// </summary> /// Equivalent to status code 501.
InternalServerError = 500, /// Indicates that the server doesn't support the functionality required to fulfill the client's
/// request.
/// <summary> /// </summary>
/// Equivalent to status code 501. Indicates that the server does not support the functionality NotImplemented = 501,
/// required to fulfill the client's request. /// <summary>
/// </summary> /// Equivalent to status code 502.
NotImplemented = 501, /// Indicates that a gateway or proxy server received an invalid response from the upstream
/// server.
/// <summary> /// </summary>
/// Equivalent to status code 502. Indicates that a gateway or proxy server received an invalid response BadGateway = 502,
/// from the upstream server. /// <summary>
/// </summary> /// Equivalent to status code 503.
BadGateway = 502, /// Indicates that the server is currently unable to handle the client's request due to
/// a temporary overloading or maintenance of the server.
/// <summary> /// </summary>
/// Equivalent to status code 503. Indicates that the server is currently unable to handle the client's request ServiceUnavailable = 503,
/// due to a temporary overloading or maintenance of the server. /// <summary>
/// </summary> /// Equivalent to status code 504.
ServiceUnavailable = 503, /// Indicates that a gateway or proxy server didn't receive a timely response from the upstream
/// server or some other auxiliary server.
/// <summary> /// </summary>
/// Equivalent to status code 504. Indicates that a gateway or proxy server did not receive a timely response GatewayTimeout = 504,
/// from the upstream server or some other auxiliary server. /// <summary>
/// </summary> /// Equivalent to status code 505.
GatewayTimeout = 504, /// Indicates that the server doesn't support the HTTP version used in the client's request.
/// </summary>
/// <summary> HttpVersionNotSupported = 505,
/// Equivalent to status code 505. Indicates that the server does not support the HTTP version }
/// used in the client's request.
/// </summary>
HttpVersionNotSupported = 505,
}
} }

Loading…
Cancel
Save