1868fa2fe829687343ffae624259930155e16dbd8Torne (Richard Coles)// Copyright 2013 The Chromium Authors. All rights reserved. 2868fa2fe829687343ffae624259930155e16dbd8Torne (Richard Coles)// Use of this source code is governed by a BSD-style license that can be 3868fa2fe829687343ffae624259930155e16dbd8Torne (Richard Coles)// found in the LICENSE file. 4868fa2fe829687343ffae624259930155e16dbd8Torne (Richard Coles) 5868fa2fe829687343ffae624259930155e16dbd8Torne (Richard Coles)// This file intentionally does not have header guards, it's included 6868fa2fe829687343ffae624259930155e16dbd8Torne (Richard Coles)// inside a macro to generate enum. 7868fa2fe829687343ffae624259930155e16dbd8Torne (Richard Coles)// 8868fa2fe829687343ffae624259930155e16dbd8Torne (Richard Coles)// This file contains the list of HTTP status codes. Taken from IANA HTTP Status 9868fa2fe829687343ffae624259930155e16dbd8Torne (Richard Coles)// Code Registry. 10868fa2fe829687343ffae624259930155e16dbd8Torne (Richard Coles)// http://www.iana.org/assignments/http-status-codes/http-status-codes.xml 11868fa2fe829687343ffae624259930155e16dbd8Torne (Richard Coles) 12868fa2fe829687343ffae624259930155e16dbd8Torne (Richard Coles)#ifndef HTTP_STATUS 13868fa2fe829687343ffae624259930155e16dbd8Torne (Richard Coles)#error "HTTP_STATUS should be defined before including this file" 14868fa2fe829687343ffae624259930155e16dbd8Torne (Richard Coles)#endif 15868fa2fe829687343ffae624259930155e16dbd8Torne (Richard Coles) 16868fa2fe829687343ffae624259930155e16dbd8Torne (Richard Coles)// Informational 1xx 17868fa2fe829687343ffae624259930155e16dbd8Torne (Richard Coles)HTTP_STATUS(CONTINUE, 100, "Continue") 18868fa2fe829687343ffae624259930155e16dbd8Torne (Richard Coles)HTTP_STATUS(SWITCHING_PROTOCOLS, 101, "Switching Protocols") 19868fa2fe829687343ffae624259930155e16dbd8Torne (Richard Coles) 20868fa2fe829687343ffae624259930155e16dbd8Torne (Richard Coles)// Successful 2xx 21868fa2fe829687343ffae624259930155e16dbd8Torne (Richard Coles)HTTP_STATUS(OK, 200, "OK") 22868fa2fe829687343ffae624259930155e16dbd8Torne (Richard Coles)HTTP_STATUS(CREATED, 201, "Created") 23868fa2fe829687343ffae624259930155e16dbd8Torne (Richard Coles)HTTP_STATUS(ACCEPTED, 202, "Accepted") 24868fa2fe829687343ffae624259930155e16dbd8Torne (Richard Coles)HTTP_STATUS(NON_AUTHORITATIVE_INFORMATION, 203, "Non-Authoritative Information") 25868fa2fe829687343ffae624259930155e16dbd8Torne (Richard Coles)HTTP_STATUS(NO_CONTENT, 204, "No Content") 26868fa2fe829687343ffae624259930155e16dbd8Torne (Richard Coles)HTTP_STATUS(RESET_CONTENT, 205, "Reset Content") 27868fa2fe829687343ffae624259930155e16dbd8Torne (Richard Coles)HTTP_STATUS(PARTIAL_CONTENT, 206, "Partial Content") 28868fa2fe829687343ffae624259930155e16dbd8Torne (Richard Coles) 29868fa2fe829687343ffae624259930155e16dbd8Torne (Richard Coles)// Redirection 3xx 30868fa2fe829687343ffae624259930155e16dbd8Torne (Richard Coles)HTTP_STATUS(MULTIPLE_CHOICES, 300, "Multiple Choices") 31868fa2fe829687343ffae624259930155e16dbd8Torne (Richard Coles)HTTP_STATUS(MOVED_PERMANENTLY, 301, "Moved Permanently") 32868fa2fe829687343ffae624259930155e16dbd8Torne (Richard Coles)HTTP_STATUS(FOUND, 302, "Found") 33868fa2fe829687343ffae624259930155e16dbd8Torne (Richard Coles)HTTP_STATUS(SEE_OTHER, 303, "See Other") 34868fa2fe829687343ffae624259930155e16dbd8Torne (Richard Coles)HTTP_STATUS(NOT_MODIFIED, 304, "Not Modified") 35868fa2fe829687343ffae624259930155e16dbd8Torne (Richard Coles)HTTP_STATUS(USE_PROXY, 305, "Use Proxy") 36868fa2fe829687343ffae624259930155e16dbd8Torne (Richard Coles)// 306 is no longer used. 37868fa2fe829687343ffae624259930155e16dbd8Torne (Richard Coles)HTTP_STATUS(TEMPORARY_REDIRECT, 307, "Temporary Redirect") 38eb525c5499e34cc9c4b825d6d9e75bb07cc06aceBen MurdochHTTP_STATUS(PERMANENT_REDIRECT, 308, "Permanent Redirect") 39868fa2fe829687343ffae624259930155e16dbd8Torne (Richard Coles) 40868fa2fe829687343ffae624259930155e16dbd8Torne (Richard Coles)// Client error 4xx 41868fa2fe829687343ffae624259930155e16dbd8Torne (Richard Coles)HTTP_STATUS(BAD_REQUEST, 400, "Bad Request") 42868fa2fe829687343ffae624259930155e16dbd8Torne (Richard Coles)HTTP_STATUS(UNAUTHORIZED, 401, "Unauthorized") 43868fa2fe829687343ffae624259930155e16dbd8Torne (Richard Coles)HTTP_STATUS(PAYMENT_REQUIRED, 402, "Payment Required") 44868fa2fe829687343ffae624259930155e16dbd8Torne (Richard Coles)HTTP_STATUS(FORBIDDEN, 403, "Forbidden") 45868fa2fe829687343ffae624259930155e16dbd8Torne (Richard Coles)HTTP_STATUS(NOT_FOUND, 404, "Not Found") 46868fa2fe829687343ffae624259930155e16dbd8Torne (Richard Coles)HTTP_STATUS(METHOD_NOT_ALLOWED, 405, "Method Not Allowed") 47868fa2fe829687343ffae624259930155e16dbd8Torne (Richard Coles)HTTP_STATUS(NOT_ACCEPTABLE, 406, "Not Acceptable") 48868fa2fe829687343ffae624259930155e16dbd8Torne (Richard Coles)HTTP_STATUS(PROXY_AUTHENTICATION_REQUIRED, 407, "Proxy Authentication Required") 49868fa2fe829687343ffae624259930155e16dbd8Torne (Richard Coles)HTTP_STATUS(REQUEST_TIMEOUT, 408, "Request Timeout") 50868fa2fe829687343ffae624259930155e16dbd8Torne (Richard Coles)HTTP_STATUS(CONFLICT, 409, "Conflict") 51868fa2fe829687343ffae624259930155e16dbd8Torne (Richard Coles)HTTP_STATUS(GONE, 410, "Gone") 52868fa2fe829687343ffae624259930155e16dbd8Torne (Richard Coles)HTTP_STATUS(LENGTH_REQUIRED, 411, "Length Required") 53868fa2fe829687343ffae624259930155e16dbd8Torne (Richard Coles)HTTP_STATUS(PRECONDITION_FAILED, 412, "Precondition Failed") 54868fa2fe829687343ffae624259930155e16dbd8Torne (Richard Coles)HTTP_STATUS(REQUEST_ENTITY_TOO_LARGE, 413, "Request Entity Too Large") 55868fa2fe829687343ffae624259930155e16dbd8Torne (Richard Coles)HTTP_STATUS(REQUEST_URI_TOO_LONG, 414, "Request-URI Too Long") 56868fa2fe829687343ffae624259930155e16dbd8Torne (Richard Coles)HTTP_STATUS(UNSUPPORTED_MEDIA_TYPE, 415, "Unsupported Media Type") 57868fa2fe829687343ffae624259930155e16dbd8Torne (Richard Coles)HTTP_STATUS(REQUESTED_RANGE_NOT_SATISFIABLE, 416, 58868fa2fe829687343ffae624259930155e16dbd8Torne (Richard Coles) "Requested Range Not Satisfiable") 59868fa2fe829687343ffae624259930155e16dbd8Torne (Richard Coles)HTTP_STATUS(EXPECTATION_FAILED, 417, "Expectation Failed") 60868fa2fe829687343ffae624259930155e16dbd8Torne (Richard Coles) 61868fa2fe829687343ffae624259930155e16dbd8Torne (Richard Coles)// Server error 5xx 62868fa2fe829687343ffae624259930155e16dbd8Torne (Richard Coles)HTTP_STATUS(INTERNAL_SERVER_ERROR, 500, "Internal Server Error") 63868fa2fe829687343ffae624259930155e16dbd8Torne (Richard Coles)HTTP_STATUS(NOT_IMPLEMENTED, 501, "Not Implemented") 64868fa2fe829687343ffae624259930155e16dbd8Torne (Richard Coles)HTTP_STATUS(BAD_GATEWAY, 502, "Bad Gateway") 65868fa2fe829687343ffae624259930155e16dbd8Torne (Richard Coles)HTTP_STATUS(SERVICE_UNAVAILABLE, 503, "Service Unavailable") 66868fa2fe829687343ffae624259930155e16dbd8Torne (Richard Coles)HTTP_STATUS(GATEWAY_TIMEOUT, 504, "Gateway Timeout") 67868fa2fe829687343ffae624259930155e16dbd8Torne (Richard Coles)HTTP_STATUS(VERSION_NOT_SUPPORTED, 505, "HTTP Version Not Supported") 68