Index: net/http/http_status_code_list.h |
diff --git a/net/http/http_status_code_list.h b/net/http/http_status_code_list.h |
new file mode 100644 |
index 0000000000000000000000000000000000000000..32e9be6d9919f9cfb23001f01d66e730233094bc |
--- /dev/null |
+++ b/net/http/http_status_code_list.h |
@@ -0,0 +1,66 @@ |
+// Copyright (c) 2013 The Chromium Authors. All rights reserved. |
+// Use of this source code is governed by a BSD-style license that can be |
+// found in the LICENSE file. |
+// |
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.
|
+// This file intentionally does not have header guards, it's included |
+// inside a macro to generate enum. |
+// |
+// 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.
|
+// Code Registry. |
+// http://www.iana.org/assignments/http-status-codes/http-status-codes.xml |
+ |
+#ifndef HTTP_STATUS |
+#error "HTTP_STATUS should be defined before including this file" |
+#endif |
+ |
+// Informational 1xx |
+HTTP_STATUS(CONTINUE, 100, "Continue") |
+HTTP_STATUS(SWITCHING_PROTOCOLS, 101, "Switching Protocols") |
+ |
+// Successful 2xx |
+HTTP_STATUS(OK, 200, "OK") |
+HTTP_STATUS(CREATED, 201, "Created") |
+HTTP_STATUS(ACCEPTED, 202, "Accepted") |
+HTTP_STATUS(NON_AUTHORITATIVE_INFORMATION, 203, "Non-Authoritative Information") |
+HTTP_STATUS(NO_CONTENT, 204, "No Content") |
+HTTP_STATUS(RESET_CONTENT, 205, "Reset Content") |
+HTTP_STATUS(PARTIAL_CONTENT, 206, "Partial Content") |
+ |
+// Redirection 3xx |
+HTTP_STATUS(MULTIPLE_CHOICES, 300, "Multiple Choices") |
+HTTP_STATUS(MOVED_PERMANENTLY, 301, "Moved Permanently") |
+HTTP_STATUS(FOUND, 302, "Found") |
+HTTP_STATUS(SEE_OTHER, 303, "See Other") |
+HTTP_STATUS(NOT_MODIFIED, 304, "Not Modified") |
+HTTP_STATUS(USE_PROXY, 305, "Use Proxy") |
+// 306 is no longer used. |
+HTTP_STATUS(TEMPORARY_REDIRECT, 307, "Temporary Redirect") |
+ |
+// Client error 4xx |
+HTTP_STATUS(BAD_REQUEST, 400, "Bad Request") |
+HTTP_STATUS(UNAUTHORIZED, 401, "Unauthorized") |
+HTTP_STATUS(PAYMENT_REQUIRED, 402, "Payment Required") |
+HTTP_STATUS(FORBIDDEN, 403, "Forbidden") |
+HTTP_STATUS(NOT_FOUND, 404, "Not Found") |
+HTTP_STATUS(METHOD_NOT_ALLOWED, 405, "Method Not Allowed") |
+HTTP_STATUS(NOT_ACCEPTABLE, 406, "Not Acceptable") |
+HTTP_STATUS(PROXY_AUTHENTICATION_REQUIRED, 407, "Proxy Authentication Required") |
+HTTP_STATUS(REQUEST_TIMEOUT, 408, "Request Timeout") |
+HTTP_STATUS(CONFLICT, 409, "Conflict") |
+HTTP_STATUS(GONE, 410, "Gone") |
+HTTP_STATUS(LENGTH_REQUIRED, 411, "Length Required") |
+HTTP_STATUS(PRECONDITION_FAILED, 412, "Precondition Failed") |
+HTTP_STATUS(REQUEST_ENTITY_TOO_LARGE, 413, "Request Entity Too Large") |
+HTTP_STATUS(REQUEST_URI_TOO_LONG, 414, "Request-URI Too Long") |
+HTTP_STATUS(UNSUPPORTED_MEDIA_TYPE, 415, "Unsupported Media Type") |
+HTTP_STATUS(REQUESTED_RANGE_NOT_SATISFIABLE, 416, |
+ "Requested Range Not Satisfiable") |
+HTTP_STATUS(EXPECTATION_FAILED, 417, "Expectation Failed") |
+ |
+// Server error 5xx |
+HTTP_STATUS(INTERNAL_SERVER_ERROR, 500, "Internal Server Error") |
+HTTP_STATUS(NOT_IMPLEMENTED, 501, "Not Implemented") |
+HTTP_STATUS(BAD_GATEWAY, 502, "Bad Gateway") |
+HTTP_STATUS(SERVICE_UNAVAILABLE, 503, "Service Unavailable") |
+HTTP_STATUS(GATEWAY_TIMEOUT, 504, "Gateway Timeout") |
+HTTP_STATUS(VERSION_NOT_SUPPORTED, 505, "HTTP Version Not Supported") |