PageRenderTime 39ms CodeModel.GetById 14ms RepoModel.GetById 1ms app.codeStats 0ms

/boost/cgi/http/status_code.hpp

http://github.com/darrengarvey/cgi
C++ Header | 94 lines | 66 code | 11 blank | 17 comment | 0 complexity | 5836e8796ad2e4b8d90c126eba8d0919 MD5 | raw file
  1. // -- http/status_code.hpp --
  2. //
  3. // Copyright (c) Darren Garvey 2007.
  4. // Distributed under the Boost Software License, Version 1.0.
  5. // (See accompanying file LICENSE_1_0.txt or copy at
  6. // http://www.boost.org/LICENSE_1_0.txt)
  7. //
  8. ////////////////////////////////////////////////////////////////
  9. #ifndef CGI_HTTP_STATUS_CODE_HPP_INCLUDED__
  10. #define CGI_HTTP_STATUS_CODE_HPP_INCLUDED__
  11. BOOST_CGI_NAMESPACE_BEGIN
  12. namespace common {
  13. namespace http {
  14. /// Standard HTTP status codes
  15. /**
  16. * See http://tools.ietf.org/html/rfc2616#section-10
  17. */
  18. enum status_code
  19. {
  20. /// Informational codes
  21. continue_ = 100, // note the trailing underscore
  22. switching_protocols,
  23. processing,
  24. /// Success codes
  25. ok = 200,
  26. created,
  27. accepted,
  28. non_authorative_information,
  29. no_content,
  30. reset_content,
  31. partial_content,
  32. multi_status,
  33. /// Redirect codes
  34. multiple_choices = 300,
  35. moved_permanently,
  36. found,
  37. see_other,
  38. not_modified,
  39. use_proxy,
  40. switch_proxy,
  41. temporary_redirect,
  42. /// Domain error codes
  43. bad_request = 400,
  44. unauthorized,
  45. payment_required,
  46. forbidden,
  47. not_found,
  48. method_not_allowed,
  49. not_acceptable,
  50. proxy_authentication_required,
  51. request_timeout,
  52. conflict,
  53. gone,
  54. length_required,
  55. precondition_failed,
  56. request_entity_too_large,
  57. request_uri_too_long,
  58. unsupported_media_type,
  59. request_range_not_satisfiable,
  60. expectation_failed,
  61. unprocessable_entity = 422,
  62. locked,
  63. failed_dependency,
  64. unordered_collection,
  65. upgrade_required,
  66. retry_with = 449,
  67. /// Internal error codes
  68. internal_server_error = 500,
  69. not_implemented,
  70. bad_gateway,
  71. service_unavailable,
  72. gateway_timeout,
  73. http_version_not_supported,
  74. insufficient_storage,
  75. bandwidth_limit_exceeded = 509
  76. };
  77. } // namespace http
  78. } // namespace common
  79. BOOST_CGI_NAMESPACE_END
  80. namespace boost { namespace http {
  81. using namespace ::BOOST_CGI_NAMESPACE::common::http;
  82. } } // namespace boost::http
  83. #endif // CGI_HTTP_STATUS_CODE_HPP_INCLUDED__