aboutsummaryrefslogtreecommitdiff
path: root/src/microhttpd/reason_phrase.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/microhttpd/reason_phrase.c')
-rw-r--r--src/microhttpd/reason_phrase.c209
1 files changed, 105 insertions, 104 deletions
diff --git a/src/microhttpd/reason_phrase.c b/src/microhttpd/reason_phrase.c
index a6ffc75f..d6fe8330 100644
--- a/src/microhttpd/reason_phrase.c
+++ b/src/microhttpd/reason_phrase.c
@@ -1,6 +1,6 @@
1/* 1/*
2 This file is part of libmicrohttpd 2 This file is part of libmicrohttpd
3 Copyright (C) 2007, 2011, 2017 Christian Grothoff, Karlson2k (Evgeny Grin) 3 Copyright (C) 2007, 2011, 2017, 2019 Christian Grothoff, Karlson2k (Evgeny Grin)
4 4
5 This library is free software; you can redistribute it and/or 5 This library is free software; you can redistribute it and/or
6 modify it under the terms of the GNU Lesser General Public 6 modify it under the terms of the GNU Lesser General Public
@@ -36,121 +36,122 @@ static const char *const invalid_hundred[] = {
36}; 36};
37 37
38static const char *const one_hundred[] = { 38static const char *const one_hundred[] = {
39 "Continue", 39 /* 100 */ "Continue" /* RFC7231, Section 6.2.1 */,
40 "Switching Protocols", 40 /* 101 */ "Switching Protocols" /* RFC7231, Section 6.2.2 */,
41 "Processing" 41 /* 102 */ "Processing" /* RFC2518 */,
42 /* 103 */ "Early Hints" /* RFC8297 */
42}; 43};
43 44
44static const char *const two_hundred[] = { 45static const char *const two_hundred[] = {
45 "OK", 46 /* 200 */ "OK" /* RFC7231, Section 6.3.1 */,
46 "Created", 47 /* 201 */ "Created" /* RFC7231, Section 6.3.2 */,
47 "Accepted", 48 /* 202 */ "Accepted" /* RFC7231, Section 6.3.3 */,
48 "Non-Authoritative Information", 49 /* 203 */ "Non-Authoritative Information" /* RFC7231, Section 6.3.4 */,
49 "No Content", 50 /* 204 */ "No Content" /* RFC7231, Section 6.3.5 */,
50 "Reset Content", 51 /* 205 */ "Reset Content" /* RFC7231, Section 6.3.6 */,
51 "Partial Content", 52 /* 206 */ "Partial Content" /* RFC7233, Section 4.1 */,
52 "Multi-Status", 53 /* 207 */ "Multi-Status" /* RFC4918 */,
53 "Already Reported", 54 /* 208 */ "Already Reported" /* RFC5842 */,
54 "Unknown", 55 /* 209 */ "Unknown" /* Not used */,
55 "Unknown", /* 210 */ 56 /* 210 */ "Unknown" /* Not used */,
56 "Unknown", 57 /* 211 */ "Unknown" /* Not used */,
57 "Unknown", 58 /* 212 */ "Unknown" /* Not used */,
58 "Unknown", 59 /* 213 */ "Unknown" /* Not used */,
59 "Unknown", 60 /* 214 */ "Unknown" /* Not used */,
60 "Unknown", /* 215 */ 61 /* 215 */ "Unknown" /* Not used */,
61 "Unknown", 62 /* 216 */ "Unknown" /* Not used */,
62 "Unknown", 63 /* 217 */ "Unknown" /* Not used */,
63 "Unknown", 64 /* 218 */ "Unknown" /* Not used */,
64 "Unknown", 65 /* 219 */ "Unknown" /* Not used */,
65 "Unknown", /* 220 */ 66 /* 220 */ "Unknown" /* Not used */,
66 "Unknown", 67 /* 221 */ "Unknown" /* Not used */,
67 "Unknown", 68 /* 222 */ "Unknown" /* Not used */,
68 "Unknown", 69 /* 223 */ "Unknown" /* Not used */,
69 "Unknown", 70 /* 224 */ "Unknown" /* Not used */,
70 "Unknown", /* 225 */ 71 /* 225 */ "Unknown" /* Not used */,
71 "IM Used" 72 /* 226 */ "IM Used" /* RFC3229 */
72}; 73};
73 74
74static const char *const three_hundred[] = { 75static const char *const three_hundred[] = {
75 "Multiple Choices", 76 /* 300 */ "Multiple Choices" /* RFC7231, Section 6.4.1 */,
76 "Moved Permanently", 77 /* 301 */ "Moved Permanently" /* RFC7231, Section 6.4.2 */,
77 "Found", 78 /* 302 */ "Found" /* RFC7231, Section 6.4.3 */,
78 "See Other", 79 /* 303 */ "See Other" /* RFC7231, Section 6.4.4 */,
79 "Not Modified", 80 /* 304 */ "Not Modified" /* RFC7232, Section 4.1 */,
80 "Use Proxy", 81 /* 305 */ "Use Proxy" /* RFC7231, Section 6.4.5 */,
81 "Switch Proxy", 82 /* 306 */ "Switch Proxy" /* Not used! RFC7231, Section 6.4.6 */,
82 "Temporary Redirect", 83 /* 307 */ "Temporary Redirect" /* RFC7231, Section 6.4.7 */,
83 "Permanent Redirect" 84 /* 308 */ "Permanent Redirect" /* RFC7538 */
84}; 85};
85 86
86static const char *const four_hundred[] = { 87static const char *const four_hundred[] = {
87 "Bad Request", 88 /* 400 */ "Bad Request" /* RFC7231, Section 6.5.1 */,
88 "Unauthorized", 89 /* 401 */ "Unauthorized" /* RFC7235, Section 3.1 */,
89 "Payment Required", 90 /* 402 */ "Payment Required" /* RFC7231, Section 6.5.2 */,
90 "Forbidden", 91 /* 403 */ "Forbidden" /* RFC7231, Section 6.5.3 */,
91 "Not Found", 92 /* 404 */ "Not Found" /* RFC7231, Section 6.5.4 */,
92 "Method Not Allowed", 93 /* 405 */ "Method Not Allowed" /* RFC7231, Section 6.5.5 */,
93 "Not Acceptable", 94 /* 406 */ "Not Acceptable" /* RFC7231, Section 6.5.6 */,
94 "Proxy Authentication Required", 95 /* 407 */ "Proxy Authentication Required" /* RFC7235, Section 3.2 */,
95 "Request Timeout", 96 /* 408 */ "Request Timeout" /* RFC7231, Section 6.5.7 */,
96 "Conflict", 97 /* 409 */ "Conflict" /* RFC7231, Section 6.5.8 */,
97 "Gone", 98 /* 410 */ "Gone" /* RFC7231, Section 6.5.9 */,
98 "Length Required", 99 /* 411 */ "Length Required" /* RFC7231, Section 6.5.10 */,
99 "Precondition Failed", 100 /* 412 */ "Precondition Failed" /* RFC7232, Section 4.2; RFC8144, Section 3.2 */,
100 "Payload Too Large", 101 /* 413 */ "Payload Too Large" /* RFC7231, Section 6.5.11 */,
101 "URI Too Long", 102 /* 414 */ "URI Too Long" /* RFC7231, Section 6.5.12 */,
102 "Unsupported Media Type", 103 /* 415 */ "Unsupported Media Type" /* RFC7231, Section 6.5.13; RFC7694, Section 3 */,
103 "Range Not Satisfiable", 104 /* 416 */ "Range Not Satisfiable" /* RFC7233, Section 4.4 */,
104 "Expectation Failed", 105 /* 417 */ "Expectation Failed" /* RFC7231, Section 6.5.14 */,
105 "Unknown", 106 /* 418 */ "Unknown" /* Not used */,
106 "Unknown", 107 /* 419 */ "Unknown" /* Not used */,
107 "Unknown", /* 420 */ 108 /* 420 */ "Unknown" /* Not used */,
108 "Misdirected Request", 109 /* 421 */ "Misdirected Request" /* RFC7540, Section 9.1.2 */,
109 "Unprocessable Entity", 110 /* 422 */ "Unprocessable Entity" /* RFC4918 */,
110 "Locked", 111 /* 423 */ "Locked" /* RFC4918 */,
111 "Failed Dependency", 112 /* 424 */ "Failed Dependency" /* RFC4918 */,
112 "Unordered Collection", 113 /* 425 */ "Too Early" /* RFC8470 */,
113 "Upgrade Required", 114 /* 426 */ "Upgrade Required" /* RFC7231, Section 6.5.15 */,
114 "Unknown", 115 /* 427 */ "Unknown" /* Not used */,
115 "Precondition Required", 116 /* 428 */ "Precondition Required" /* RFC6585 */,
116 "Too Many Requests", 117 /* 429 */ "Too Many Requests" /* RFC6585 */,
117 "Unknown", /* 430 */ 118 /* 430 */ "Unknown" /* Not used */,
118 "Request Header Fields Too Large", 119 /* 431 */ "Request Header Fields Too Large" /* RFC6585 */,
119 "Unknown", 120 /* 432 */ "Unknown" /* Not used */,
120 "Unknown", 121 /* 433 */ "Unknown" /* Not used */,
121 "Unknown", 122 /* 434 */ "Unknown" /* Not used */,
122 "Unknown", /* 435 */ 123 /* 435 */ "Unknown" /* Not used */,
123 "Unknown", 124 /* 436 */ "Unknown" /* Not used */,
124 "Unknown", 125 /* 437 */ "Unknown" /* Not used */,
125 "Unknown", 126 /* 438 */ "Unknown" /* Not used */,
126 "Unknown", 127 /* 439 */ "Unknown" /* Not used */,
127 "Unknown", /* 440 */ 128 /* 440 */ "Unknown" /* Not used */,
128 "Unknown", 129 /* 441 */ "Unknown" /* Not used */,
129 "Unknown", 130 /* 442 */ "Unknown" /* Not used */,
130 "Unknown", 131 /* 443 */ "Unknown" /* Not used */,
131 "No Response", 132 /* 444 */ "Unknown" /* Not used */,
132 "Unknown", /* 445 */ 133 /* 445 */ "Unknown" /* Not used */,
133 "Unknown", 134 /* 446 */ "Unknown" /* Not used */,
134 "Unknown", 135 /* 447 */ "Unknown" /* Not used */,
135 "Unknown", 136 /* 448 */ "Unknown" /* Not used */,
136 "Retry With", 137 /* 449 */ "Reply With" /* MS IIS extension */,
137 "Blocked by Windows Parental Controls", /* 450 */ 138 /* 450 */ "Blocked by Windows Parental Controls" /* MS extension */,
138 "Unavailable For Legal Reasons" 139 /* 451 */ "Unavailable For Legal Reasons" /* RFC7725 */
139}; 140};
140 141
141static const char *const five_hundred[] = { 142static const char *const five_hundred[] = {
142 "Internal Server Error", 143 /* 500 */ "Internal Server Error" /* RFC7231, Section 6.6.1 */,
143 "Not Implemented", 144 /* 501 */ "Not Implemented" /* RFC7231, Section 6.6.2 */,
144 "Bad Gateway", 145 /* 502 */ "Bad Gateway" /* RFC7231, Section 6.6.3 */,
145 "Service Unavailable", 146 /* 503 */ "Service Unavailable" /* RFC7231, Section 6.6.4 */,
146 "Gateway Timeout", 147 /* 504 */ "Gateway Timeout" /* RFC7231, Section 6.6.5 */,
147 "HTTP Version Not Supported", 148 /* 505 */ "HTTP Version Not Supported" /* RFC7231, Section 6.6.6 */,
148 "Variant Also Negotiates", 149 /* 506 */ "Variant Also Negotiates" /* RFC2295 */,
149 "Insufficient Storage", 150 /* 507 */ "Insufficient Storage" /* RFC4918 */,
150 "Loop Detected", 151 /* 508 */ "Loop Detected" /* RFC5842 */,
151 "Bandwidth Limit Exceeded", 152 /* 509 */ "Bandwidth Limit Exceeded" /* Apache extension */,
152 "Not Extended", 153 /* 510 */ "Not Extended" /* RFC2774 */,
153 "Network Authentication Required" 154 /* 511 */ "Network Authentication Required" /* RFC6585 */
154}; 155};
155 156
156 157