1 // Copyright (c) 2009 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.
5 #include "net/tools/flip_server/http_message_constants.h"
9 const char* get_http_status_message(int status_message
) {
10 switch (status_message
) {
14 return "Switching Protocols";
22 return "Non-Authoritative Information";
26 return "Reset Content";
28 return "Partial Content";
30 return "Multiple Choices";
32 return "Moved Permanently";
38 return "Not Modified";
42 return "Temporary Redirect";
46 return "Unauthorized";
48 return "Payment Required";
54 return "Method Not Allowed";
56 return "Not Acceptable";
58 return "Proxy Authentication Required";
60 return "Request Time-out";
66 return "Length Required";
68 return "Precondition Failed";
70 return "Request Entity Too Large";
72 return "Request-URI Too Large";
74 return "Unsupported Media Type";
76 return "Requested range not satisfiable";
78 return "Expectation Failed";
80 return "Internal Server Error";
82 return "Not Implemented";
86 return "Service Unavailable";
88 return "Gateway Time-out";
90 return "HTTP Version not supported";
95 const int http_status_codes
[] = {
96 100, 101, 200, 201, 202, 203, 204, 205, 206, 300, 301, 302, 303, 304,
97 305, 307, 400, 401, 402, 403, 404, 405, 406, 407, 408, 409, 410, 411,
98 412, 413, 414, 415, 416, 417, 500, 501, 502, 503, 504, 505};
100 const int http_status_code_count
=
101 sizeof(http_status_codes
) / sizeof(http_status_codes
[0]);