HttpStatusCode.cs 13 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346
  1. #region License
  2. /*
  3. * HttpStatusCode.cs
  4. *
  5. * This code is derived from HttpStatusCode.cs (System.Net) of Mono
  6. * (http://www.mono-project.com).
  7. *
  8. * It was automatically generated from ECMA CLI XML Library Specification.
  9. * Generator: libgen.xsl [1.0; (C) Sergey Chaban (serge@wildwestsoftware.com)]
  10. * Created: Wed, 5 Sep 2001 06:32:05 UTC
  11. * Source file: AllTypes.xml
  12. * URL: http://msdn.microsoft.com/net/ecma/AllTypes.xml
  13. *
  14. * The MIT License
  15. *
  16. * Copyright (c) 2001 Ximian, Inc. (http://www.ximian.com)
  17. * Copyright (c) 2012-2020 sta.blockhead
  18. *
  19. * Permission is hereby granted, free of charge, to any person obtaining a copy
  20. * of this software and associated documentation files (the "Software"), to deal
  21. * in the Software without restriction, including without limitation the rights
  22. * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
  23. * copies of the Software, and to permit persons to whom the Software is
  24. * furnished to do so, subject to the following conditions:
  25. *
  26. * The above copyright notice and this permission notice shall be included in
  27. * all copies or substantial portions of the Software.
  28. *
  29. * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
  30. * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
  31. * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
  32. * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
  33. * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
  34. * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
  35. * THE SOFTWARE.
  36. */
  37. #endregion
  38. namespace WebSocketSharp.Net
  39. {
  40. /// <summary>
  41. /// Indicates the HTTP status code that can be specified in a server response.
  42. /// </summary>
  43. /// <remarks>
  44. /// The values of this enumeration are defined in
  45. /// <see href="http://tools.ietf.org/html/rfc2616#section-10">RFC 2616</see>.
  46. /// </remarks>
  47. public enum HttpStatusCode
  48. {
  49. /// <summary>
  50. /// Equivalent to status code 100. Indicates that the client should continue
  51. /// with its request.
  52. /// </summary>
  53. Continue = 100,
  54. /// <summary>
  55. /// Equivalent to status code 101. Indicates that the server is switching
  56. /// the HTTP version or protocol on the connection.
  57. /// </summary>
  58. SwitchingProtocols = 101,
  59. /// <summary>
  60. /// Equivalent to status code 200. Indicates that the client's request has
  61. /// succeeded.
  62. /// </summary>
  63. OK = 200,
  64. /// <summary>
  65. /// Equivalent to status code 201. Indicates that the client's request has
  66. /// been fulfilled and resulted in a new resource being created.
  67. /// </summary>
  68. Created = 201,
  69. /// <summary>
  70. /// Equivalent to status code 202. Indicates that the client's request has
  71. /// been accepted for processing, but the processing has not been completed.
  72. /// </summary>
  73. Accepted = 202,
  74. /// <summary>
  75. /// Equivalent to status code 203. Indicates that the returned metainformation
  76. /// is from a local or a third-party copy instead of the origin server.
  77. /// </summary>
  78. NonAuthoritativeInformation = 203,
  79. /// <summary>
  80. /// Equivalent to status code 204. Indicates that the server has fulfilled
  81. /// the client's request but does not need to return an entity-body.
  82. /// </summary>
  83. NoContent = 204,
  84. /// <summary>
  85. /// Equivalent to status code 205. Indicates that the server has fulfilled
  86. /// the client's request, and the user agent should reset the document view
  87. /// which caused the request to be sent.
  88. /// </summary>
  89. ResetContent = 205,
  90. /// <summary>
  91. /// Equivalent to status code 206. Indicates that the server has fulfilled
  92. /// the partial GET request for the resource.
  93. /// </summary>
  94. PartialContent = 206,
  95. /// <summary>
  96. /// <para>
  97. /// Equivalent to status code 300. Indicates that the requested resource
  98. /// corresponds to any of multiple representations.
  99. /// </para>
  100. /// <para>
  101. /// MultipleChoices is a synonym for Ambiguous.
  102. /// </para>
  103. /// </summary>
  104. MultipleChoices = 300,
  105. /// <summary>
  106. /// <para>
  107. /// Equivalent to status code 300. Indicates that the requested resource
  108. /// corresponds to any of multiple representations.
  109. /// </para>
  110. /// <para>
  111. /// Ambiguous is a synonym for MultipleChoices.
  112. /// </para>
  113. /// </summary>
  114. Ambiguous = 300,
  115. /// <summary>
  116. /// <para>
  117. /// Equivalent to status code 301. Indicates that the requested resource
  118. /// has been assigned a new permanent URI and any future references to
  119. /// this resource should use one of the returned URIs.
  120. /// </para>
  121. /// <para>
  122. /// MovedPermanently is a synonym for Moved.
  123. /// </para>
  124. /// </summary>
  125. MovedPermanently = 301,
  126. /// <summary>
  127. /// <para>
  128. /// Equivalent to status code 301. Indicates that the requested resource
  129. /// has been assigned a new permanent URI and any future references to
  130. /// this resource should use one of the returned URIs.
  131. /// </para>
  132. /// <para>
  133. /// Moved is a synonym for MovedPermanently.
  134. /// </para>
  135. /// </summary>
  136. Moved = 301,
  137. /// <summary>
  138. /// <para>
  139. /// Equivalent to status code 302. Indicates that the requested resource
  140. /// is located temporarily under a different URI.
  141. /// </para>
  142. /// <para>
  143. /// Found is a synonym for Redirect.
  144. /// </para>
  145. /// </summary>
  146. Found = 302,
  147. /// <summary>
  148. /// <para>
  149. /// Equivalent to status code 302. Indicates that the requested resource
  150. /// is located temporarily under a different URI.
  151. /// </para>
  152. /// <para>
  153. /// Redirect is a synonym for Found.
  154. /// </para>
  155. /// </summary>
  156. Redirect = 302,
  157. /// <summary>
  158. /// <para>
  159. /// Equivalent to status code 303. Indicates that the response to
  160. /// the request can be found under a different URI and should be
  161. /// retrieved using a GET method on that resource.
  162. /// </para>
  163. /// <para>
  164. /// SeeOther is a synonym for RedirectMethod.
  165. /// </para>
  166. /// </summary>
  167. SeeOther = 303,
  168. /// <summary>
  169. /// <para>
  170. /// Equivalent to status code 303. Indicates that the response to
  171. /// the request can be found under a different URI and should be
  172. /// retrieved using a GET method on that resource.
  173. /// </para>
  174. /// <para>
  175. /// RedirectMethod is a synonym for SeeOther.
  176. /// </para>
  177. /// </summary>
  178. RedirectMethod = 303,
  179. /// <summary>
  180. /// Equivalent to status code 304. Indicates that the client has performed
  181. /// a conditional GET request and access is allowed, but the document has
  182. /// not been modified.
  183. /// </summary>
  184. NotModified = 304,
  185. /// <summary>
  186. /// Equivalent to status code 305. Indicates that the requested resource
  187. /// must be accessed through the proxy given by the Location field.
  188. /// </summary>
  189. UseProxy = 305,
  190. /// <summary>
  191. /// Equivalent to status code 306. This status code was used in a previous
  192. /// version of the specification, is no longer used, and is reserved for
  193. /// future use.
  194. /// </summary>
  195. Unused = 306,
  196. /// <summary>
  197. /// <para>
  198. /// Equivalent to status code 307. Indicates that the requested resource
  199. /// is located temporarily under a different URI.
  200. /// </para>
  201. /// <para>
  202. /// TemporaryRedirect is a synonym for RedirectKeepVerb.
  203. /// </para>
  204. /// </summary>
  205. TemporaryRedirect = 307,
  206. /// <summary>
  207. /// <para>
  208. /// Equivalent to status code 307. Indicates that the requested resource
  209. /// is located temporarily under a different URI.
  210. /// </para>
  211. /// <para>
  212. /// RedirectKeepVerb is a synonym for TemporaryRedirect.
  213. /// </para>
  214. /// </summary>
  215. RedirectKeepVerb = 307,
  216. /// <summary>
  217. /// Equivalent to status code 400. Indicates that the client's request could
  218. /// not be understood by the server due to malformed syntax.
  219. /// </summary>
  220. BadRequest = 400,
  221. /// <summary>
  222. /// Equivalent to status code 401. Indicates that the client's request
  223. /// requires user authentication.
  224. /// </summary>
  225. Unauthorized = 401,
  226. /// <summary>
  227. /// Equivalent to status code 402. This status code is reserved for future
  228. /// use.
  229. /// </summary>
  230. PaymentRequired = 402,
  231. /// <summary>
  232. /// Equivalent to status code 403. Indicates that the server understood
  233. /// the client's request but is refusing to fulfill it.
  234. /// </summary>
  235. Forbidden = 403,
  236. /// <summary>
  237. /// Equivalent to status code 404. Indicates that the server has not found
  238. /// anything matching the request URI.
  239. /// </summary>
  240. NotFound = 404,
  241. /// <summary>
  242. /// Equivalent to status code 405. Indicates that the method specified
  243. /// in the request line is not allowed for the resource identified by
  244. /// the request URI.
  245. /// </summary>
  246. MethodNotAllowed = 405,
  247. /// <summary>
  248. /// Equivalent to status code 406. Indicates that the server does not
  249. /// have the appropriate resource to respond to the Accept headers in
  250. /// the client's request.
  251. /// </summary>
  252. NotAcceptable = 406,
  253. /// <summary>
  254. /// Equivalent to status code 407. Indicates that the client must first
  255. /// authenticate itself with the proxy.
  256. /// </summary>
  257. ProxyAuthenticationRequired = 407,
  258. /// <summary>
  259. /// Equivalent to status code 408. Indicates that the client did not produce
  260. /// a request within the time that the server was prepared to wait.
  261. /// </summary>
  262. RequestTimeout = 408,
  263. /// <summary>
  264. /// Equivalent to status code 409. Indicates that the client's request could
  265. /// not be completed due to a conflict on the server.
  266. /// </summary>
  267. Conflict = 409,
  268. /// <summary>
  269. /// Equivalent to status code 410. Indicates that the requested resource is
  270. /// no longer available at the server and no forwarding address is known.
  271. /// </summary>
  272. Gone = 410,
  273. /// <summary>
  274. /// Equivalent to status code 411. Indicates that the server refuses to
  275. /// accept the client's request without a defined Content-Length.
  276. /// </summary>
  277. LengthRequired = 411,
  278. /// <summary>
  279. /// Equivalent to status code 412. Indicates that the precondition given in
  280. /// one or more of the request headers evaluated to false when it was tested
  281. /// on the server.
  282. /// </summary>
  283. PreconditionFailed = 412,
  284. /// <summary>
  285. /// Equivalent to status code 413. Indicates that the entity of the client's
  286. /// request is larger than the server is willing or able to process.
  287. /// </summary>
  288. RequestEntityTooLarge = 413,
  289. /// <summary>
  290. /// Equivalent to status code 414. Indicates that the request URI is longer
  291. /// than the server is willing to interpret.
  292. /// </summary>
  293. RequestUriTooLong = 414,
  294. /// <summary>
  295. /// Equivalent to status code 415. Indicates that the entity of the client's
  296. /// request is in a format not supported by the requested resource for the
  297. /// requested method.
  298. /// </summary>
  299. UnsupportedMediaType = 415,
  300. /// <summary>
  301. /// Equivalent to status code 416. Indicates that none of the range
  302. /// specifier values in a Range request header overlap the current
  303. /// extent of the selected resource.
  304. /// </summary>
  305. RequestedRangeNotSatisfiable = 416,
  306. /// <summary>
  307. /// Equivalent to status code 417. Indicates that the expectation given in
  308. /// an Expect request header could not be met by the server.
  309. /// </summary>
  310. ExpectationFailed = 417,
  311. /// <summary>
  312. /// Equivalent to status code 500. Indicates that the server encountered
  313. /// an unexpected condition which prevented it from fulfilling the client's
  314. /// request.
  315. /// </summary>
  316. InternalServerError = 500,
  317. /// <summary>
  318. /// Equivalent to status code 501. Indicates that the server does not
  319. /// support the functionality required to fulfill the client's request.
  320. /// </summary>
  321. NotImplemented = 501,
  322. /// <summary>
  323. /// Equivalent to status code 502. Indicates that a gateway or proxy server
  324. /// received an invalid response from the upstream server.
  325. /// </summary>
  326. BadGateway = 502,
  327. /// <summary>
  328. /// Equivalent to status code 503. Indicates that the server is currently
  329. /// unable to handle the client's request due to a temporary overloading
  330. /// or maintenance of the server.
  331. /// </summary>
  332. ServiceUnavailable = 503,
  333. /// <summary>
  334. /// Equivalent to status code 504. Indicates that a gateway or proxy server
  335. /// did not receive a timely response from the upstream server or some other
  336. /// auxiliary server.
  337. /// </summary>
  338. GatewayTimeout = 504,
  339. /// <summary>
  340. /// Equivalent to status code 505. Indicates that the server does not
  341. /// support the HTTP version used in the client's request.
  342. /// </summary>
  343. HttpVersionNotSupported = 505,
  344. }
  345. }