Http.php 3.6 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091
  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. public const STATUS_CONTINUE = 100;
  32. public const STATUS_SWITCHING_PROTOCOLS = 101;
  33. public const STATUS_PROCESSING = 102;
  34. public const STATUS_OK = 200;
  35. public const STATUS_CREATED = 201;
  36. public const STATUS_ACCEPTED = 202;
  37. public const STATUS_NON_AUTHORATIVE_INFORMATION = 203;
  38. public const STATUS_NO_CONTENT = 204;
  39. public const STATUS_RESET_CONTENT = 205;
  40. public const STATUS_PARTIAL_CONTENT = 206;
  41. public const STATUS_MULTI_STATUS = 207;
  42. public const STATUS_ALREADY_REPORTED = 208;
  43. public const STATUS_IM_USED = 226;
  44. public const STATUS_MULTIPLE_CHOICES = 300;
  45. public const STATUS_MOVED_PERMANENTLY = 301;
  46. public const STATUS_FOUND = 302;
  47. public const STATUS_SEE_OTHER = 303;
  48. public const STATUS_NOT_MODIFIED = 304;
  49. public const STATUS_USE_PROXY = 305;
  50. public const STATUS_RESERVED = 306;
  51. public const STATUS_TEMPORARY_REDIRECT = 307;
  52. public const STATUS_BAD_REQUEST = 400;
  53. public const STATUS_UNAUTHORIZED = 401;
  54. public const STATUS_PAYMENT_REQUIRED = 402;
  55. public const STATUS_FORBIDDEN = 403;
  56. public const STATUS_NOT_FOUND = 404;
  57. public const STATUS_METHOD_NOT_ALLOWED = 405;
  58. public const STATUS_NOT_ACCEPTABLE = 406;
  59. public const STATUS_PROXY_AUTHENTICATION_REQUIRED = 407;
  60. public const STATUS_REQUEST_TIMEOUT = 408;
  61. public const STATUS_CONFLICT = 409;
  62. public const STATUS_GONE = 410;
  63. public const STATUS_LENGTH_REQUIRED = 411;
  64. public const STATUS_PRECONDITION_FAILED = 412;
  65. public const STATUS_REQUEST_ENTITY_TOO_LARGE = 413;
  66. public const STATUS_REQUEST_URI_TOO_LONG = 414;
  67. public const STATUS_UNSUPPORTED_MEDIA_TYPE = 415;
  68. public const STATUS_REQUEST_RANGE_NOT_SATISFIABLE = 416;
  69. public const STATUS_EXPECTATION_FAILED = 417;
  70. public const STATUS_IM_A_TEAPOT = 418;
  71. public const STATUS_UNPROCESSABLE_ENTITY = 422;
  72. public const STATUS_LOCKED = 423;
  73. public const STATUS_FAILED_DEPENDENCY = 424;
  74. public const STATUS_UPGRADE_REQUIRED = 426;
  75. public const STATUS_PRECONDITION_REQUIRED = 428;
  76. public const STATUS_TOO_MANY_REQUESTS = 429;
  77. public const STATUS_REQUEST_HEADER_FIELDS_TOO_LARGE = 431;
  78. public const STATUS_INTERNAL_SERVER_ERROR = 500;
  79. public const STATUS_NOT_IMPLEMENTED = 501;
  80. public const STATUS_BAD_GATEWAY = 502;
  81. public const STATUS_SERVICE_UNAVAILABLE = 503;
  82. public const STATUS_GATEWAY_TIMEOUT = 504;
  83. public const STATUS_HTTP_VERSION_NOT_SUPPORTED = 505;
  84. public const STATUS_VARIANT_ALSO_NEGOTIATES = 506;
  85. public const STATUS_INSUFFICIENT_STORAGE = 507;
  86. public const STATUS_LOOP_DETECTED = 508;
  87. public const STATUS_BANDWIDTH_LIMIT_EXCEEDED = 509;
  88. public const STATUS_NOT_EXTENDED = 510;
  89. public const STATUS_NETWORK_AUTHENTICATION_REQUIRED = 511;
  90. }