1
0

Http.php 5.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326
  1. <?php
  2. /**
  3. * @copyright Copyright (c) 2016, ownCloud, Inc.
  4. *
  5. * @author Christoph Wurst <christoph@winzerhof-wurst.at>
  6. * @author Morris Jobke <hey@morrisjobke.de>
  7. * @author Thomas Müller <thomas.mueller@tmit.eu>
  8. * @author Thomas Tanghus <thomas@tanghus.net>
  9. *
  10. * @license AGPL-3.0
  11. *
  12. * This code is free software: you can redistribute it and/or modify
  13. * it under the terms of the GNU Affero General Public License, version 3,
  14. * as published by the Free Software Foundation.
  15. *
  16. * This program is distributed in the hope that it will be useful,
  17. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  18. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  19. * GNU Affero General Public License for more details.
  20. *
  21. * You should have received a copy of the GNU Affero General Public License, version 3,
  22. * along with this program. If not, see <http://www.gnu.org/licenses/>
  23. *
  24. */
  25. namespace OCP\AppFramework;
  26. /**
  27. * Base class which contains constants for HTTP status codes
  28. * @since 6.0.0
  29. */
  30. class Http {
  31. /**
  32. * @since 6.0.0
  33. */
  34. public const STATUS_CONTINUE = 100;
  35. /**
  36. * @since 6.0.0
  37. */
  38. public const STATUS_SWITCHING_PROTOCOLS = 101;
  39. /**
  40. * @since 6.0.0
  41. */
  42. public const STATUS_PROCESSING = 102;
  43. /**
  44. * @since 6.0.0
  45. */
  46. public const STATUS_OK = 200;
  47. /**
  48. * @since 6.0.0
  49. */
  50. public const STATUS_CREATED = 201;
  51. /**
  52. * @since 6.0.0
  53. */
  54. public const STATUS_ACCEPTED = 202;
  55. /**
  56. * @since 6.0.0
  57. */
  58. public const STATUS_NON_AUTHORATIVE_INFORMATION = 203;
  59. /**
  60. * @since 6.0.0
  61. */
  62. public const STATUS_NO_CONTENT = 204;
  63. /**
  64. * @since 6.0.0
  65. */
  66. public const STATUS_RESET_CONTENT = 205;
  67. /**
  68. * @since 6.0.0
  69. */
  70. public const STATUS_PARTIAL_CONTENT = 206;
  71. /**
  72. * @since 6.0.0
  73. */
  74. public const STATUS_MULTI_STATUS = 207;
  75. /**
  76. * @since 6.0.0
  77. */
  78. public const STATUS_ALREADY_REPORTED = 208;
  79. /**
  80. * @since 6.0.0
  81. */
  82. public const STATUS_IM_USED = 226;
  83. /**
  84. * @since 6.0.0
  85. */
  86. public const STATUS_MULTIPLE_CHOICES = 300;
  87. /**
  88. * @since 6.0.0
  89. */
  90. public const STATUS_MOVED_PERMANENTLY = 301;
  91. /**
  92. * @since 6.0.0
  93. */
  94. public const STATUS_FOUND = 302;
  95. /**
  96. * @since 6.0.0
  97. */
  98. public const STATUS_SEE_OTHER = 303;
  99. /**
  100. * @since 6.0.0
  101. */
  102. public const STATUS_NOT_MODIFIED = 304;
  103. /**
  104. * @since 6.0.0
  105. */
  106. public const STATUS_USE_PROXY = 305;
  107. /**
  108. * @since 6.0.0
  109. */
  110. public const STATUS_RESERVED = 306;
  111. /**
  112. * @since 6.0.0
  113. */
  114. public const STATUS_TEMPORARY_REDIRECT = 307;
  115. /**
  116. * @since 6.0.0
  117. */
  118. public const STATUS_BAD_REQUEST = 400;
  119. /**
  120. * @since 6.0.0
  121. */
  122. public const STATUS_UNAUTHORIZED = 401;
  123. /**
  124. * @since 6.0.0
  125. */
  126. public const STATUS_PAYMENT_REQUIRED = 402;
  127. /**
  128. * @since 6.0.0
  129. */
  130. public const STATUS_FORBIDDEN = 403;
  131. /**
  132. * @since 6.0.0
  133. */
  134. public const STATUS_NOT_FOUND = 404;
  135. /**
  136. * @since 6.0.0
  137. */
  138. public const STATUS_METHOD_NOT_ALLOWED = 405;
  139. /**
  140. * @since 6.0.0
  141. */
  142. public const STATUS_NOT_ACCEPTABLE = 406;
  143. /**
  144. * @since 6.0.0
  145. */
  146. public const STATUS_PROXY_AUTHENTICATION_REQUIRED = 407;
  147. /**
  148. * @since 6.0.0
  149. */
  150. public const STATUS_REQUEST_TIMEOUT = 408;
  151. /**
  152. * @since 6.0.0
  153. */
  154. public const STATUS_CONFLICT = 409;
  155. /**
  156. * @since 6.0.0
  157. */
  158. public const STATUS_GONE = 410;
  159. /**
  160. * @since 6.0.0
  161. */
  162. public const STATUS_LENGTH_REQUIRED = 411;
  163. /**
  164. * @since 6.0.0
  165. */
  166. public const STATUS_PRECONDITION_FAILED = 412;
  167. /**
  168. * @since 6.0.0
  169. */
  170. public const STATUS_REQUEST_ENTITY_TOO_LARGE = 413;
  171. /**
  172. * @since 6.0.0
  173. */
  174. public const STATUS_REQUEST_URI_TOO_LONG = 414;
  175. /**
  176. * @since 6.0.0
  177. */
  178. public const STATUS_UNSUPPORTED_MEDIA_TYPE = 415;
  179. /**
  180. * @since 6.0.0
  181. */
  182. public const STATUS_REQUEST_RANGE_NOT_SATISFIABLE = 416;
  183. /**
  184. * @since 6.0.0
  185. */
  186. public const STATUS_EXPECTATION_FAILED = 417;
  187. /**
  188. * @since 6.0.0
  189. */
  190. public const STATUS_IM_A_TEAPOT = 418;
  191. /**
  192. * @since 6.0.0
  193. */
  194. public const STATUS_UNPROCESSABLE_ENTITY = 422;
  195. /**
  196. * @since 6.0.0
  197. */
  198. public const STATUS_LOCKED = 423;
  199. /**
  200. * @since 6.0.0
  201. */
  202. public const STATUS_FAILED_DEPENDENCY = 424;
  203. /**
  204. * @since 6.0.0
  205. */
  206. public const STATUS_UPGRADE_REQUIRED = 426;
  207. /**
  208. * @since 6.0.0
  209. */
  210. public const STATUS_PRECONDITION_REQUIRED = 428;
  211. /**
  212. * @since 6.0.0
  213. */
  214. public const STATUS_TOO_MANY_REQUESTS = 429;
  215. /**
  216. * @since 6.0.0
  217. */
  218. public const STATUS_REQUEST_HEADER_FIELDS_TOO_LARGE = 431;
  219. /**
  220. * @since 6.0.0
  221. */
  222. public const STATUS_INTERNAL_SERVER_ERROR = 500;
  223. /**
  224. * @since 6.0.0
  225. */
  226. public const STATUS_NOT_IMPLEMENTED = 501;
  227. /**
  228. * @since 6.0.0
  229. */
  230. public const STATUS_BAD_GATEWAY = 502;
  231. /**
  232. * @since 6.0.0
  233. */
  234. public const STATUS_SERVICE_UNAVAILABLE = 503;
  235. /**
  236. * @since 6.0.0
  237. */
  238. public const STATUS_GATEWAY_TIMEOUT = 504;
  239. /**
  240. * @since 6.0.0
  241. */
  242. public const STATUS_HTTP_VERSION_NOT_SUPPORTED = 505;
  243. /**
  244. * @since 6.0.0
  245. */
  246. public const STATUS_VARIANT_ALSO_NEGOTIATES = 506;
  247. /**
  248. * @since 6.0.0
  249. */
  250. public const STATUS_INSUFFICIENT_STORAGE = 507;
  251. /**
  252. * @since 6.0.0
  253. */
  254. public const STATUS_LOOP_DETECTED = 508;
  255. /**
  256. * @since 6.0.0
  257. */
  258. public const STATUS_BANDWIDTH_LIMIT_EXCEEDED = 509;
  259. /**
  260. * @since 6.0.0
  261. */
  262. public const STATUS_NOT_EXTENDED = 510;
  263. /**
  264. * @since 6.0.0
  265. */
  266. public const STATUS_NETWORK_AUTHENTICATION_REQUIRED = 511;
  267. }