OLD | NEW |
---|---|
(Empty) | |
1 // Copyright (c) 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 // | |
wtc
2013/06/07 21:24:18
Nit: make this a blank line, without the //
tyoshino (SeeGerritForStatus)
2013/06/10 06:14:00
Done. So, like net_error_list.h, L7 should be also
wtc
2013/06/10 17:12:47
The latter. I mainly want us to split the copyrigh
tyoshino (SeeGerritForStatus)
2013/06/11 03:21:15
All right. Thanks.
| |
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 | |
wtc
2013/06/07 21:24:18
Nit: File => file
tyoshino (SeeGerritForStatus)
2013/06/10 06:14:00
Done.
| |
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 | |
17 HTTP_STATUS(CONTINUE, 100, "Continue") | |
18 HTTP_STATUS(SWITCHING_PROTOCOLS, 101, "Switching Protocols") | |
19 | |
20 // Successful 2xx | |
21 HTTP_STATUS(OK, 200, "OK") | |
22 HTTP_STATUS(CREATED, 201, "Created") | |
23 HTTP_STATUS(ACCEPTED, 202, "Accepted") | |
24 HTTP_STATUS(NON_AUTHORITATIVE_INFORMATION, 203, "Non-Authoritative Information") | |
25 HTTP_STATUS(NO_CONTENT, 204, "No Content") | |
26 HTTP_STATUS(RESET_CONTENT, 205, "Reset Content") | |
27 HTTP_STATUS(PARTIAL_CONTENT, 206, "Partial Content") | |
28 | |
29 // Redirection 3xx | |
30 HTTP_STATUS(MULTIPLE_CHOICES, 300, "Multiple Choices") | |
31 HTTP_STATUS(MOVED_PERMANENTLY, 301, "Moved Permanently") | |
32 HTTP_STATUS(FOUND, 302, "Found") | |
33 HTTP_STATUS(SEE_OTHER, 303, "See Other") | |
34 HTTP_STATUS(NOT_MODIFIED, 304, "Not Modified") | |
35 HTTP_STATUS(USE_PROXY, 305, "Use Proxy") | |
36 // 306 is no longer used. | |
37 HTTP_STATUS(TEMPORARY_REDIRECT, 307, "Temporary Redirect") | |
38 | |
39 // Client error 4xx | |
40 HTTP_STATUS(BAD_REQUEST, 400, "Bad Request") | |
41 HTTP_STATUS(UNAUTHORIZED, 401, "Unauthorized") | |
42 HTTP_STATUS(PAYMENT_REQUIRED, 402, "Payment Required") | |
43 HTTP_STATUS(FORBIDDEN, 403, "Forbidden") | |
44 HTTP_STATUS(NOT_FOUND, 404, "Not Found") | |
45 HTTP_STATUS(METHOD_NOT_ALLOWED, 405, "Method Not Allowed") | |
46 HTTP_STATUS(NOT_ACCEPTABLE, 406, "Not Acceptable") | |
47 HTTP_STATUS(PROXY_AUTHENTICATION_REQUIRED, 407, "Proxy Authentication Required") | |
48 HTTP_STATUS(REQUEST_TIMEOUT, 408, "Request Timeout") | |
49 HTTP_STATUS(CONFLICT, 409, "Conflict") | |
50 HTTP_STATUS(GONE, 410, "Gone") | |
51 HTTP_STATUS(LENGTH_REQUIRED, 411, "Length Required") | |
52 HTTP_STATUS(PRECONDITION_FAILED, 412, "Precondition Failed") | |
53 HTTP_STATUS(REQUEST_ENTITY_TOO_LARGE, 413, "Request Entity Too Large") | |
54 HTTP_STATUS(REQUEST_URI_TOO_LONG, 414, "Request-URI Too Long") | |
55 HTTP_STATUS(UNSUPPORTED_MEDIA_TYPE, 415, "Unsupported Media Type") | |
56 HTTP_STATUS(REQUESTED_RANGE_NOT_SATISFIABLE, 416, | |
57 "Requested Range Not Satisfiable") | |
58 HTTP_STATUS(EXPECTATION_FAILED, 417, "Expectation Failed") | |
59 | |
60 // Server error 5xx | |
61 HTTP_STATUS(INTERNAL_SERVER_ERROR, 500, "Internal Server Error") | |
62 HTTP_STATUS(NOT_IMPLEMENTED, 501, "Not Implemented") | |
63 HTTP_STATUS(BAD_GATEWAY, 502, "Bad Gateway") | |
64 HTTP_STATUS(SERVICE_UNAVAILABLE, 503, "Service Unavailable") | |
65 HTTP_STATUS(GATEWAY_TIMEOUT, 504, "Gateway Timeout") | |
66 HTTP_STATUS(VERSION_NOT_SUPPORTED, 505, "HTTP Version Not Supported") | |
OLD | NEW |