blob: 75c2304c5bd76edc477a675553e365c92f5f6538 [file] [log] [blame]
Przemyslaw Pietrzkiewicz3c3a7ff2015-02-06 17:15:07 +01001// Copyright 2013 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// This file intentionally does not have header guards, it's included
6// inside a macro to generate enum.
7//
8// This file contains the list of HTTP status codes. Taken from IANA HTTP Status
9// Code Registry.
10// http://www.iana.org/assignments/http-status-codes/http-status-codes.xml
11
12#ifndef HTTP_STATUS
13#error "HTTP_STATUS should be defined before including this file"
14#endif
15
16// Informational 1xx
17HTTP_STATUS(CONTINUE, 100, "Continue")
18HTTP_STATUS(SWITCHING_PROTOCOLS, 101, "Switching Protocols")
19
20// Successful 2xx
21HTTP_STATUS(OK, 200, "OK")
22HTTP_STATUS(CREATED, 201, "Created")
23HTTP_STATUS(ACCEPTED, 202, "Accepted")
24HTTP_STATUS(NON_AUTHORITATIVE_INFORMATION, 203, "Non-Authoritative Information")
25HTTP_STATUS(NO_CONTENT, 204, "No Content")
26HTTP_STATUS(RESET_CONTENT, 205, "Reset Content")
27HTTP_STATUS(PARTIAL_CONTENT, 206, "Partial Content")
28
29// Redirection 3xx
30HTTP_STATUS(MULTIPLE_CHOICES, 300, "Multiple Choices")
31HTTP_STATUS(MOVED_PERMANENTLY, 301, "Moved Permanently")
32HTTP_STATUS(FOUND, 302, "Found")
33HTTP_STATUS(SEE_OTHER, 303, "See Other")
34HTTP_STATUS(NOT_MODIFIED, 304, "Not Modified")
35HTTP_STATUS(USE_PROXY, 305, "Use Proxy")
36// 306 is no longer used.
37HTTP_STATUS(TEMPORARY_REDIRECT, 307, "Temporary Redirect")
38HTTP_STATUS(PERMANENT_REDIRECT, 308, "Permanent Redirect")
39
40// Client error 4xx
41HTTP_STATUS(BAD_REQUEST, 400, "Bad Request")
42HTTP_STATUS(UNAUTHORIZED, 401, "Unauthorized")
43HTTP_STATUS(PAYMENT_REQUIRED, 402, "Payment Required")
44HTTP_STATUS(FORBIDDEN, 403, "Forbidden")
45HTTP_STATUS(NOT_FOUND, 404, "Not Found")
46HTTP_STATUS(METHOD_NOT_ALLOWED, 405, "Method Not Allowed")
47HTTP_STATUS(NOT_ACCEPTABLE, 406, "Not Acceptable")
48HTTP_STATUS(PROXY_AUTHENTICATION_REQUIRED, 407, "Proxy Authentication Required")
49HTTP_STATUS(REQUEST_TIMEOUT, 408, "Request Timeout")
50HTTP_STATUS(CONFLICT, 409, "Conflict")
51HTTP_STATUS(GONE, 410, "Gone")
52HTTP_STATUS(LENGTH_REQUIRED, 411, "Length Required")
53HTTP_STATUS(PRECONDITION_FAILED, 412, "Precondition Failed")
54HTTP_STATUS(REQUEST_ENTITY_TOO_LARGE, 413, "Request Entity Too Large")
55HTTP_STATUS(REQUEST_URI_TOO_LONG, 414, "Request-URI Too Long")
56HTTP_STATUS(UNSUPPORTED_MEDIA_TYPE, 415, "Unsupported Media Type")
57HTTP_STATUS(REQUESTED_RANGE_NOT_SATISFIABLE, 416,
58 "Requested Range Not Satisfiable")
59HTTP_STATUS(EXPECTATION_FAILED, 417, "Expectation Failed")
60
61// Server error 5xx
62HTTP_STATUS(INTERNAL_SERVER_ERROR, 500, "Internal Server Error")
63HTTP_STATUS(NOT_IMPLEMENTED, 501, "Not Implemented")
64HTTP_STATUS(BAD_GATEWAY, 502, "Bad Gateway")
65HTTP_STATUS(SERVICE_UNAVAILABLE, 503, "Service Unavailable")
66HTTP_STATUS(GATEWAY_TIMEOUT, 504, "Gateway Timeout")
67HTTP_STATUS(VERSION_NOT_SUPPORTED, 505, "HTTP Version Not Supported")