/indra/llcommon/llhttpstatuscodes.h

https://bitbucket.org/lindenlab/viewer-beta/ · C++ Header · 89 lines · 45 code · 9 blank · 35 comment · 0 complexity · 8d22615d67d873b86834ae2c8337a7bd MD5 · raw file

  1. /**
  2. * @file llhttpstatuscodes.h
  3. * @brief Constants for HTTP status codes
  4. *
  5. * $LicenseInfo:firstyear=2001&license=viewerlgpl$
  6. * Second Life Viewer Source Code
  7. * Copyright (C) 2010, Linden Research, Inc.
  8. *
  9. * This library is free software; you can redistribute it and/or
  10. * modify it under the terms of the GNU Lesser General Public
  11. * License as published by the Free Software Foundation;
  12. * version 2.1 of the License only.
  13. *
  14. * This library is distributed in the hope that it will be useful,
  15. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  16. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
  17. * Lesser General Public License for more details.
  18. *
  19. * You should have received a copy of the GNU Lesser General Public
  20. * License along with this library; if not, write to the Free Software
  21. * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
  22. *
  23. * Linden Research, Inc., 945 Battery Street, San Francisco, CA 94111 USA
  24. * $/LicenseInfo$
  25. */
  26. #ifndef LL_HTTP_STATUS_CODES_H
  27. #define LL_HTTP_STATUS_CODES_H
  28. #include "stdtypes.h"
  29. // Standard errors from HTTP spec:
  30. // http://www.w3.org/Protocols/rfc2616/rfc2616-sec6.html#sec6.1
  31. const S32 HTTP_CONTINUE = 100;
  32. const S32 HTTP_SWITCHING_PROTOCOLS = 101;
  33. // Success
  34. const S32 HTTP_OK = 200;
  35. const S32 HTTP_CREATED = 201;
  36. const S32 HTTP_ACCEPTED = 202;
  37. const S32 HTTP_NON_AUTHORITATIVE_INFORMATION = 203;
  38. const S32 HTTP_NO_CONTENT = 204;
  39. const S32 HTTP_RESET_CONTENT = 205;
  40. const S32 HTTP_PARTIAL_CONTENT = 206;
  41. // Redirection
  42. const S32 HTTP_MULTIPLE_CHOICES = 300;
  43. const S32 HTTP_MOVED_PERMANENTLY = 301;
  44. const S32 HTTP_FOUND = 302;
  45. const S32 HTTP_SEE_OTHER = 303;
  46. const S32 HTTP_NOT_MODIFIED = 304;
  47. const S32 HTTP_USE_PROXY = 305;
  48. const S32 HTTP_TEMPORARY_REDIRECT = 307;
  49. // Client Error
  50. const S32 HTTP_BAD_REQUEST = 400;
  51. const S32 HTTP_UNAUTHORIZED = 401;
  52. const S32 HTTP_PAYMENT_REQUIRED = 402;
  53. const S32 HTTP_FORBIDDEN = 403;
  54. const S32 HTTP_NOT_FOUND = 404;
  55. const S32 HTTP_METHOD_NOT_ALLOWED = 405;
  56. const S32 HTTP_NOT_ACCEPTABLE = 406;
  57. const S32 HTTP_PROXY_AUTHENTICATION_REQUIRED = 407;
  58. const S32 HTTP_REQUEST_TIME_OUT = 408;
  59. const S32 HTTP_CONFLICT = 409;
  60. const S32 HTTP_GONE = 410;
  61. const S32 HTTP_LENGTH_REQUIRED = 411;
  62. const S32 HTTP_PRECONDITION_FAILED = 412;
  63. const S32 HTTP_REQUEST_ENTITY_TOO_LARGE = 413;
  64. const S32 HTTP_REQUEST_URI_TOO_LARGE = 414;
  65. const S32 HTTP_UNSUPPORTED_MEDIA_TYPE = 415;
  66. const S32 HTTP_REQUESTED_RANGE_NOT_SATISFIABLE = 416;
  67. const S32 HTTP_EXPECTATION_FAILED = 417;
  68. // Server Error
  69. const S32 HTTP_INTERNAL_SERVER_ERROR = 500;
  70. const S32 HTTP_NOT_IMPLEMENTED = 501;
  71. const S32 HTTP_BAD_GATEWAY = 502;
  72. const S32 HTTP_SERVICE_UNAVAILABLE = 503;
  73. const S32 HTTP_GATEWAY_TIME_OUT = 504;
  74. const S32 HTTP_VERSION_NOT_SUPPORTED = 505;
  75. // We combine internal process errors with status codes
  76. // These status codes should not be sent over the wire
  77. // and indicate something went wrong internally.
  78. // If you get these they are not normal.
  79. const S32 HTTP_INTERNAL_ERROR = 499;
  80. #endif