http_status_code.h revision 5821806d5e7f356e8fa4b058a389a808ea183019
1// Copyright (c) 2012 The Chromium Authors. All rights reserved. 2// Use of this source code is governed by a BSD-style license that can be 3// found in the LICENSE file. 4 5#ifndef NET_HTTP_HTTP_STATUS_CODE_H_ 6#define NET_HTTP_HTTP_STATUS_CODE_H_ 7 8namespace net { 9 10// HTTP status codes. 11// Taken from RFC 2616 Section 10. 12enum HttpStatusCode { 13 // Informational 1xx 14 HTTP_CONTINUE = 100, 15 HTTP_SWITCHING_PROTOCOLS = 101, 16 17 // Successful 2xx 18 HTTP_OK = 200, 19 HTTP_CREATED = 201, 20 HTTP_ACCEPTED = 202, 21 HTTP_NON_AUTHORITATIVE_INFORMATION = 203, 22 HTTP_NO_CONTENT = 204, 23 HTTP_RESET_CONTENT = 205, 24 HTTP_PARTIAL_CONTENT = 206, 25 26 // Redirection 3xx 27 HTTP_MULTIPLE_CHOICES = 300, 28 HTTP_MOVED_PERMANENTLY = 301, 29 HTTP_FOUND = 302, 30 HTTP_SEE_OTHER = 303, 31 HTTP_NOT_MODIFIED = 304, 32 HTTP_USE_PROXY = 305, 33 // 306 is no longer used. 34 HTTP_TEMPORARY_REDIRECT = 307, 35 36 // Client error 4xx 37 HTTP_BAD_REQUEST = 400, 38 HTTP_UNAUTHORIZED = 401, 39 HTTP_PAYMENT_REQUIRED = 402, 40 HTTP_FORBIDDEN = 403, 41 HTTP_NOT_FOUND = 404, 42 HTTP_METHOD_NOT_ALLOWED = 405, 43 HTTP_NOT_ACCEPTABLE = 406, 44 HTTP_PROXY_AUTHENTICATION_REQUIRED = 407, 45 HTTP_REQUEST_TIMEOUT = 408, 46 HTTP_CONFLICT = 409, 47 HTTP_GONE = 410, 48 HTTP_LENGTH_REQUIRED = 411, 49 HTTP_PRECONDITION_FAILED = 412, 50 HTTP_REQUEST_ENTITY_TOO_LARGE = 413, 51 HTTP_REQUEST_URI_TOO_LONG = 414, 52 HTTP_UNSUPPORTED_MEDIA_TYPE = 415, 53 HTTP_REQUESTED_RANGE_NOT_SATISFIABLE = 416, 54 HTTP_EXPECTATION_FAILED = 417, 55 56 // Server error 5xx 57 HTTP_INTERNAL_SERVER_ERROR = 500, 58 HTTP_NOT_IMPLEMENTED = 501, 59 HTTP_BAD_GATEWAY = 502, 60 HTTP_SERVICE_UNAVAILABLE = 503, 61 HTTP_GATEWAY_TIMEOUT = 504, 62 HTTP_VERSION_NOT_SUPPORTED = 505, 63}; 64 65} // namespace net 66 67#endif // NET_HTTP_HTTP_STATUS_CODE_H_ 68