| OLD | NEW |
| 1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #include "net/tools/balsa/http_message_constants.h" | 5 #include "net/tools/balsa/http_message_constants.h" |
| 6 | 6 |
| 7 namespace net { | 7 namespace net { |
| 8 | 8 |
| 9 const char* get_http_status_message(int status_message) { | 9 const char* get_http_status_message(int status_message) { |
| 10 switch (status_message) { | 10 switch (status_message) { |
| (...skipping 77 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 88 return "Gateway Time-out"; | 88 return "Gateway Time-out"; |
| 89 case 505: | 89 case 505: |
| 90 return "HTTP Version not supported"; | 90 return "HTTP Version not supported"; |
| 91 } | 91 } |
| 92 return "unknown"; | 92 return "unknown"; |
| 93 } | 93 } |
| 94 | 94 |
| 95 //////////////////////////////////////////////////////////////////////////////// | 95 //////////////////////////////////////////////////////////////////////////////// |
| 96 | 96 |
| 97 const int http_status_codes[] = { | 97 const int http_status_codes[] = { |
| 98 100, | 98 100, 101, 200, 201, 202, 203, 204, 205, 206, 300, 301, 302, 303, 304, |
| 99 101, | 99 305, 307, 400, 401, 402, 403, 404, 405, 406, 407, 408, 409, 410, 411, |
| 100 200, | 100 412, 413, 414, 415, 416, 417, 500, 501, 502, 503, 504, 505}; |
| 101 201, | |
| 102 202, | |
| 103 203, | |
| 104 204, | |
| 105 205, | |
| 106 206, | |
| 107 300, | |
| 108 301, | |
| 109 302, | |
| 110 303, | |
| 111 304, | |
| 112 305, | |
| 113 307, | |
| 114 400, | |
| 115 401, | |
| 116 402, | |
| 117 403, | |
| 118 404, | |
| 119 405, | |
| 120 406, | |
| 121 407, | |
| 122 408, | |
| 123 409, | |
| 124 410, | |
| 125 411, | |
| 126 412, | |
| 127 413, | |
| 128 414, | |
| 129 415, | |
| 130 416, | |
| 131 417, | |
| 132 500, | |
| 133 501, | |
| 134 502, | |
| 135 503, | |
| 136 504, | |
| 137 505 | |
| 138 }; | |
| 139 | 101 |
| 140 //////////////////////////////////////////////////////////////////////////////// | 102 //////////////////////////////////////////////////////////////////////////////// |
| 141 | 103 |
| 142 const int http_status_code_count = sizeof(http_status_codes) / | 104 const int http_status_code_count = |
| 143 sizeof(http_status_codes[0]); | 105 sizeof(http_status_codes) / sizeof(http_status_codes[0]); |
| 144 | 106 |
| 145 } // namespace net | 107 } // namespace net |
| 146 | |
| OLD | NEW |