hscode 0.1.0

Sign up to get free protection for your applications and to get access to all the features.
@@ -0,0 +1,1089 @@
1
+ module Hscode
2
+ HTTP_STATUS_CODES = {
3
+ 100 => {
4
+ title: 'Continue',
5
+ description: [
6
+ 'The initial part of a request has been received and has not yet '\
7
+ 'been rejected by the server. The server intends to send a final '\
8
+ 'response after the request has been fully received and acted upon.',
9
+ 'When the request contains an Expect header field that includes a '\
10
+ '100-continue expectation, the 100 response indicates that the '\
11
+ 'server wishes to receive the request payload body.'\
12
+ 'The client ought to continue sending the request and discard'\
13
+ ' the 100 response.',
14
+ 'If the request did not contain an Expect header field containing' \
15
+ 'the 100-continue expectation, the client can simply discard this' \
16
+ 'interim response.'
17
+ ]
18
+ },
19
+ 101 => {
20
+ title: 'Switching Protocols',
21
+ description: [
22
+ "The server understands and is willing to comply with the client's "\
23
+ 'request, via the Upgrade header field, for a change in the '\
24
+ 'application protocol being used on this connection.',
25
+ 'The server MUST generate an Upgrade header field in the response '\
26
+ 'that indicates which protocol(s) will be switched to immediately '\
27
+ 'after the empty line that terminates the 101 response.',
28
+ 'It is assumed that the server will only agree to switch protocols '\
29
+ 'when it is advantageous to do so. For example, switching to a newer '\
30
+ 'version of HTTP might be advantageous over older versions, and '\
31
+ 'switching to a real-time, synchronous protocol might be '\
32
+ 'advantageous when delivering resources that use such features.'
33
+ ]
34
+ },
35
+ 102 => {
36
+ title: 'Processing',
37
+ description: [
38
+ 'An interim response used to inform the client that the server has '\
39
+ 'accepted the complete request, but has not yet completed it.',
40
+ 'This status code SHOULD only be sent when the server has a '\
41
+ 'reasonable expectation that the request will take significant '\
42
+ 'time to complete. As guidance, if a method is taking longer than '\
43
+ '20 seconds (a reasonable, but arbitrary value) to process the '\
44
+ 'server SHOULD return a 102 (Processing) response. The server MUST '\
45
+ 'send a final response after the request has been completed.',
46
+ 'Methods can potentially take a long period of time to process, '\
47
+ 'especially methods that support the Depth header. In such cases the '\
48
+ 'client may time-out the connection while waiting for a response. To '\
49
+ 'prevent this the server may return a 102 Processing status code to '\
50
+ 'indicate to the client that the server is still processing the method.'
51
+ ]
52
+ },
53
+ 200 => {
54
+ title: 'OK',
55
+ description: [
56
+ 'The request has succeeded.',
57
+ 'The payload sent in a 200 response depends on the request method. '\
58
+ 'For the methods defined by this specification, the intended '\
59
+ 'meaning of the payload can be summarized as:',
60
+ 'Aside from responses to CONNECT, a 200 response always has a '\
61
+ 'payload, though an origin server MAY generate a payload body of '\
62
+ 'zero length. If no payload is desired, an origin server ought to '\
63
+ 'send 204 No Content instead. For CONNECT, no payload is allowed '\
64
+ 'because the successful result is a tunnel, which begins immediately '\
65
+ 'after the 200 response header section.',
66
+ 'A 200 response is cacheable by default; i.e., unless otherwise '\
67
+ 'indicated by the method definition or explicit cache controls.'
68
+ ]
69
+ },
70
+ 201 => {
71
+ title: 'Created',
72
+ description: [
73
+ 'The request has been fulfilled and has resulted in one or more new '\
74
+ 'resources being created.',
75
+ 'The primary resource created by the request is identified by '\
76
+ 'either a Location header field in the response or, if no Location '\
77
+ 'field is received, by the effective request URI.',
78
+ 'The 201 response payload typically describes and links to the '\
79
+ 'resource(s) created. See Section 7.2 of RFC7231 for a discussion of '\
80
+ 'the meaning and purpose of validator header fields, such as ETag and '\
81
+ 'Last-Modified, in a 201 response.'
82
+ ]
83
+ },
84
+ 202 => {
85
+ title: 'Accepted',
86
+ description: [
87
+ 'The request has been accepted for processing, but the processing '\
88
+ 'has not been completed. The request might or might not eventually '\
89
+ 'be acted upon, as it might be disallowed when processing actually '\
90
+ 'takes place.',
91
+ 'There is no facility in HTTP for re-sending a status code from an '\
92
+ 'asynchronous operation.',
93
+ 'The 202 response is intentionally noncommittal. Its purpose is '\
94
+ 'to allow a server to accept a request for some other process '\
95
+ '(perhaps a batch-oriented process that is only run once per day) '\
96
+ "without requiring that the user agent's connection to the server "\
97
+ 'persist until the process is completed. The representation sent '\
98
+ "with this response ought to describe the request's current status "\
99
+ 'and point to (or embed) a status monitor that can provide the user '\
100
+ 'with an estimate of when the request will be fulfilled.'
101
+ ]
102
+ },
103
+ 203 => {
104
+ title: 'Non-authoritative Information',
105
+ description: [
106
+ 'The request was successful but the enclosed payload has been '\
107
+ "modified from that of the origin server's 200 OK response by a "\
108
+ 'transforming proxy.',
109
+ 'This status code allows the proxy to notify recipients when a '\
110
+ 'transformation has been applied, since that knowledge might impact '\
111
+ 'later decisions regarding the content. For example, future cache '\
112
+ 'validation requests for the content might only be applicable along '\
113
+ 'the same request path (through the same proxies).',
114
+ 'The 203 response is similar to the Warning code of 214 '\
115
+ 'Transformation Applied2, which has the advantage of being '\
116
+ 'applicable to responses with any status code.',
117
+ 'A 203 response is cacheable by default; i.e., unless otherwise '\
118
+ 'indicated by the method definition or explicit cache controls3.'
119
+ ]
120
+ },
121
+ 204 => {
122
+ title: 'No Content',
123
+ description: [
124
+ 'The server has successfully fulfilled the request and that there is '\
125
+ 'no additional content to send in the response payload body.',
126
+ 'Metadata in the response header fields refer to the target resource '\
127
+ 'and its selected representation after the requested action was '\
128
+ 'applied.',
129
+ 'For example, if a 204 status code is received in response to a PUT '\
130
+ 'request and the response contains an ETag header field, then the PUT '\
131
+ 'was successful and the ETag field-value contains the entity-tag for '\
132
+ 'the new representation of that target resource.',
133
+ 'The 204 response allows a server to indicate that the action has '\
134
+ 'been successfully applied to the target resource, while implying '\
135
+ 'that the user agent does not need to traverse away from its '\
136
+ 'current "document view" (if any). The server assumes that the user '\
137
+ 'agent will provide some indication of the success to its user, in '\
138
+ 'accord with its own interface, and apply any new or updated metadata '\
139
+ 'in the response to its active representation.',
140
+ 'For example, a 204 status code is commonly used with document '\
141
+ 'editing interfaces corresponding to a "save" action, such that the '\
142
+ 'document being saved remains available to the user for editing. '\
143
+ 'It is also frequently used with interfaces that expect automated '\
144
+ 'data transfers to be prevalent, such as within distributed '\
145
+ 'version control systems.',
146
+ 'A 204 response is terminated by the first empty line after the '\
147
+ 'header fields because it cannot contain a message body.',
148
+ 'A 204 response is cacheable by default; i.e., unless otherwise '\
149
+ 'indicated by the method definition or explicit cache controls.'
150
+ ]
151
+ },
152
+ 205 => {
153
+ title: 'Reset Content',
154
+ description: [
155
+ 'The server has fulfilled the request and desires that the user '\
156
+ 'agent reset the "document view", which caused the request to be '\
157
+ 'sent, to its original state as received from the origin server.',
158
+ 'This response is intended to support a common data entry use case '\
159
+ 'where the user receives content that supports data entry '\
160
+ '(a form, notepad, canvas, etc.), enters or manipulates data in '\
161
+ 'that space, causes the entered data to be submitted in a request, '\
162
+ 'and then the data entry mechanism is reset for the next entry so '\
163
+ 'that the user can easily initiate another input action.',
164
+ 'Since the 205 status code implies that no additional content will '\
165
+ 'be provided, a server MUST NOT generate a payload in a 205 response. '\
166
+ 'In other words, a server MUST do one of the following for a 205 '\
167
+ 'response: a) indicate a zero-length body for the response by '\
168
+ 'including a Content-Length header field with a value of 0; b) '\
169
+ 'indicate a zero-length payload for the response by including a '\
170
+ 'Transfer-Encoding header field with a value of chunked and a '\
171
+ 'message body consisting of a single chunk of zero-length; or, c) '\
172
+ 'close the connection immediately after sending the blank line '\
173
+ 'terminating the header section.'
174
+ ]
175
+ },
176
+ 206 => {
177
+ title: 'Partial Content',
178
+ description: [
179
+ 'The server is successfully fulfilling a range request for the '\
180
+ 'target resource by transferring one or more parts of the selected '\
181
+ 'representation that correspond to the satisfiable ranges found in '\
182
+ "the request's Range header field.",
183
+ 'If a single part is being transferred, the server generating the '\
184
+ '206 response MUST generate a Content-Range header field, describing '\
185
+ 'what range of the selected representation is enclosed, and a '\
186
+ 'payload consisting of the range. For example:',
187
+ 'If multiple parts are being transferred, the server generating the '\
188
+ '206 response MUST generate a "multipart/byteranges" payload2, and '\
189
+ 'a Content-Type header field containing the multipart/byteranges '\
190
+ 'media type and its required boundary parameter. To avoid confusion '\
191
+ 'with single-part responses, a server MUST NOT generate a '\
192
+ 'Content-Range header field in the HTTP header section of a multiple '\
193
+ 'part response (this field will be sent in each part instead).',
194
+ 'Within the header area of each body part in the multipart payload, '\
195
+ 'the server MUST generate a Content-Range header field corresponding '\
196
+ 'to the range being enclosed in that body part. If the selected '\
197
+ 'representation would have had a Content-Type header field in a 200 '\
198
+ 'OK response, the server SHOULD generate that same Content-Type '\
199
+ 'field in the header area of each body part. For example:',
200
+ 'When multiple ranges are requested, a server MAY coalesce any of '\
201
+ 'the ranges that overlap, or that are separated by a gap that is '\
202
+ 'smaller than the overhead of sending multiple parts, regardless of '\
203
+ 'the order in which the corresponding byte-range-spec appeared in '\
204
+ 'the received Range header field. Since the typical overhead between '\
205
+ 'parts of a multipart/byteranges payload is around 80 bytes, '\
206
+ "depending on the selected representation's media type and the "\
207
+ 'chosen boundary parameter length, it can be less efficient to '\
208
+ 'transfer many small disjoint parts than it is to transfer the '\
209
+ 'entire selected representation.',
210
+ 'A server MUST NOT generate a multipart response to a request for '\
211
+ 'a single range, since a client that does not request multiple parts '\
212
+ 'might not support multipart responses. However, a server MAY '\
213
+ 'generate a multipart/byteranges payload with only a single body '\
214
+ 'part if multiple ranges were requested and only one range was found '\
215
+ 'to be satisfiable or only one range remained after coalescing. '\
216
+ 'A client that cannot process a multipart/byteranges response MUST '\
217
+ 'NOT generate a request that asks for multiple ranges.',
218
+ 'When a multipart response payload is generated, the server '\
219
+ 'SHOULD send the parts in the same order that the corresponding '\
220
+ 'byte-range-spec appeared in the received Range header field, '\
221
+ 'excluding those ranges that were deemed unsatisfiable or that '\
222
+ 'were coalesced into other ranges. A client that receives a multipart '\
223
+ 'response MUST inspect the Content-Range header field present in each '\
224
+ 'body part in order to determine which range is contained in that '\
225
+ 'body part; a client cannot rely on receiving the same ranges that '\
226
+ 'it requested, nor the same order that it requested.',
227
+ 'When a 206 response is generated, the server MUST generate the '\
228
+ 'following header fields, in addition to those required above, if '\
229
+ 'the field would have been sent in a 200 OK response to the same '\
230
+ 'request: Date, Cache-Control, ETag, Expires, Content-Location, '\
231
+ 'and Vary.',
232
+ 'If a 206 is generated in response to a request with an If-Range '\
233
+ 'header field, the sender SHOULD NOT generate other representation '\
234
+ 'header fields beyond those required above, because the client is '\
235
+ 'understood to already have a prior response containing those header '\
236
+ 'fields. Otherwise, the sender MUST generate all of the '\
237
+ 'representation header fields that would have been sent in a 200 OK '\
238
+ 'response to the same request.',
239
+ 'A 206 response is cacheable by default; i.e., unless otherwise '\
240
+ 'indicated by explicit cache controls3.'
241
+ ]
242
+ },
243
+ 207 => {
244
+ title: 'Multi-Status',
245
+ description: [
246
+ 'A Multi-Status response conveys information about multiple '\
247
+ 'resources in situations where multiple status codes might '\
248
+ 'be appropriate.',
249
+ 'The default Multi-Status response body is a text/xml or '\
250
+ "application/xml HTTP entity with a 'multistatus' root element. "\
251
+ 'Further elements contain 200, 300, 400, and 500 series status '\
252
+ 'codes generated during the method invocation. 100 series status '\
253
+ "codes SHOULD NOT be recorded in a 'response' XML element.",
254
+ "Although '207' is used as the overall response status code, the "\
255
+ 'recipient needs to consult the contents of the multistatus response '\
256
+ 'body for further information about the success or failure of the '\
257
+ 'method execution. The response MAY be used in success, partial '\
258
+ 'success and also in failure situations.',
259
+ "The 'multistatus' root element holds zero or more 'response' "\
260
+ 'elements in any order, each with information about an individual '\
261
+ "resource. Each 'response' element MUST have an 'href' element to "\
262
+ 'identify the resource.',
263
+ 'A Multi-Status response uses one out of two distinct formats for '\
264
+ 'representing the status:',
265
+ "1. A 'status' element as child of the 'response' element indicates "\
266
+ 'the status of the message execution for the identified resource as '\
267
+ 'a whole. Some method definitions provide information about specific '\
268
+ 'status codes clients should be prepared to see in a response. '\
269
+ 'However, clients MUST be able to handle other status codes, using '\
270
+ 'the generic rules defined in RFC2616 Section 10.',
271
+ '2. For PROPFIND and PROPPATCH, the format has been extended using '\
272
+ "the 'propstat' element instead of 'status', providing information "\
273
+ 'about individual properties of a resource. This format is specific '\
274
+ 'to PROPFIND and PROPPATCH, and is described in detail in RFC4918 '\
275
+ 'Section 9.1 and RFC4918 Section 9.2.'
276
+ ]
277
+ },
278
+ 208 => {
279
+ title: 'Already Reported',
280
+ description: [
281
+ 'Used inside a DAV: propstat response element to avoid enumerating '\
282
+ 'the internal members of multiple bindings to the same '\
283
+ 'collection repeatedly.',
284
+ "For each binding to a collection inside the request's scope, "\
285
+ 'only one will be reported with a 200 status, while subsequent '\
286
+ 'DAV:response elements for all other bindings will use the 208 '\
287
+ 'status, and no DAV:response elements for their descendants '\
288
+ 'are included.', 'Note that the 208 status will only occur '\
289
+ 'for "Depth: infinity" requests, and that it is of particular '\
290
+ 'importance when the multiple collection bindings cause a bind '\
291
+ 'loop.', 'A client can request the DAV:resource-id property in a '\
292
+ 'PROPFIND request to guarantee that they can accurately '\
293
+ 'reconstruct the binding structure of a collection with multiple '\
294
+ 'bindings to a single resource.',
295
+ 'For backward compatibility with clients not aware of the 208 '\
296
+ 'status code appearing in multistatus response bodies, it SHOULD '\
297
+ 'NOT be used unless the client has signaled support for this '\
298
+ 'specification using the "DAV" request header2. Instead, a 508 '\
299
+ 'Loop Detected status should be returned when a binding loop is '\
300
+ 'discovered. This allows the server to return the 508 as the '\
301
+ 'top-level return status, if it discovers it before it started the '\
302
+ 'response, or in the middle of a multistatus, if it discovers it '\
303
+ 'in the middle of streaming out a multistatus response.'
304
+ ]
305
+ },
306
+ 226 => {
307
+ title: 'IM Used',
308
+ description: [
309
+ 'The server has fulfilled a GET request for the resource, and '\
310
+ 'the response is a representation of the result of one or more '\
311
+ 'instance-manipulations applied to the current instance.',
312
+ 'The actual current instance might not be available except by '\
313
+ 'combining this response with other previous or future responses, '\
314
+ 'as appropriate for the specific instance-manipulation(s). If so, '\
315
+ 'the headers of the resulting instance are the result of combining '\
316
+ 'the headers from the 226 response and the other instances, '\
317
+ 'following the rules in section 13.5.3 of the HTTP/1.1 specification.',
318
+ 'The request MUST have included an A-IM header field listing at '\
319
+ 'least one instance-manipulation. The response MUST include an Etag '\
320
+ 'header field giving the entity tag of the current instance.',
321
+ 'A response received with a status code of 226 MAY be stored by a '\
322
+ 'cache and used in reply to a subsequent request, subject to the '\
323
+ 'HTTP expiration mechanism and any Cache-Control headers, and to '\
324
+ 'the requirements in section 10.6.',
325
+ 'A response received with a status code of 226 MAY be used by a '\
326
+ 'cache, in conjunction with a cache entry for the base instance, to '\
327
+ 'create a cache entry for the current instance.'
328
+ ]
329
+ },
330
+ 300 => {
331
+ title: 'Multiple Choices',
332
+ description: [
333
+ 'The target resource has more than one representation, each with '\
334
+ 'its own more specific identifier, and information about the '\
335
+ 'alternatives is being provided so that the user (or user agent) '\
336
+ 'can select a preferred representation by redirecting its request '\
337
+ 'to one or more of those identifiers.',
338
+ 'In other words, the server desires that the user agent engage '\
339
+ 'in reactive negotiation to select the most appropriate '\
340
+ 'representation(s) for its needs.',
341
+ 'If the server has a preferred choice, the server SHOULD generate '\
342
+ "a Location header field containing a preferred choice's URI "\
343
+ 'reference. The user agent MAY use the Location field value for '\
344
+ 'automatic redirection.',
345
+ 'For request methods other than HEAD, the server SHOULD generate '\
346
+ 'a payload in the 300 response containing a list of representation '\
347
+ 'metadata and URI reference(s) from which the user or user agent can '\
348
+ 'choose the one most preferred. The user agent MAY make a selection '\
349
+ 'from that list automatically if it understands the provided media '\
350
+ 'type. A specific format for automatic selection is not defined by '\
351
+ 'this specification because HTTP tries to remain orthogonal to the '\
352
+ 'definition of its payloads. In practice, the representation is '\
353
+ 'provided in some easily parsed format believed to be acceptable to '\
354
+ 'the user agent, as determined by shared design or content '\
355
+ 'negotiation, or in some commonly accepted hypertext format.',
356
+ 'A 300 response is cacheable by default; i.e., unless otherwise '\
357
+ 'indicated by the method definition or explicit cache controls2.',
358
+ 'Note: The original proposal for the 300 status code defined the '\
359
+ 'URI header field as providing a list of alternative '\
360
+ 'representations, such that it would be usable for 200, 300, and 406 '\
361
+ 'responses and be transferred in responses to the HEAD method. '\
362
+ 'However, lack of deployment and disagreement over syntax led to '\
363
+ 'both URI and Alternates (a subsequent proposal) being dropped from '\
364
+ 'this specification. It is possible to communicate the list using a '\
365
+ 'set of Link header fields3, each with a relationship '\
366
+ 'of "alternate", though deployment is a chicken-and-egg problem.'
367
+ ]
368
+ },
369
+ 301 => {
370
+ title: 'Moved Permanently',
371
+ description: [
372
+ 'The target resource has been assigned a new permanent URI and any '\
373
+ 'future references to this resource ought to use one of the '\
374
+ 'enclosed URIs.',
375
+ 'Clients with link-editing capabilities ought to automatically '\
376
+ 're-link references to the effective request URI to one or more of '\
377
+ 'the new references sent by the server, where possible.',
378
+ 'The server SHOULD generate a Location header field in the response '\
379
+ 'containing a preferred URI reference for the new permanent URI. The '\
380
+ 'user agent MAY use the Location field value for automatic '\
381
+ "redirection. The server's response payload usually contains a short "\
382
+ 'hypertext note with a hyperlink to the new URI(s).',
383
+ 'Note: For historical reasons, a user agent MAY change the request '\
384
+ 'method from POST to GET for the subsequent request. If this behavior '\
385
+ 'is undesired, the 307 Temporary Redirect status code can be '\
386
+ 'used instead.',
387
+ 'A 301 response is cacheable by default; i.e., unless otherwise '\
388
+ 'indicated by the method definition or explicit cache controls.'
389
+ ]
390
+ },
391
+ 302 => {
392
+ title: 'Found',
393
+ description: [
394
+ 'The target resource resides temporarily under a different URI. '\
395
+ 'Since the redirection might be altered on occasion, the client ought '\
396
+ 'to continue to use the effective request URI for future requests.',
397
+ 'The server SHOULD generate a Location header field in the response '\
398
+ 'containing a URI reference for the different URI. The user agent MAY '\
399
+ 'use the Location field value for automatic redirection. '\
400
+ "The server's response payload usually contains a short hypertext "\
401
+ 'note with a hyperlink to the different URI(s).',
402
+ 'Note: For historical reasons, a user agent MAY change the request '\
403
+ 'method from POST to GET for the subsequent request. If this behavior '\
404
+ 'is undesired, the 307 Temporary Redirect status code can be '\
405
+ 'used instead.'
406
+ ]
407
+ },
408
+ 303 => {
409
+ title: 'See Other',
410
+ description: [
411
+ 'The server is redirecting the user agent to a different resource, '\
412
+ 'as indicated by a URI in the Location header field, which is '\
413
+ 'intended to provide an indirect response to the original request.',
414
+ 'A user agent can perform a retrieval request targeting that URI '\
415
+ '(a GET or HEAD request if using HTTP), which might also be '\
416
+ 'redirected, and present the eventual result as an answer to the '\
417
+ 'original request. Note that the new URI in the Location header '\
418
+ 'field is not considered equivalent to the effective request URI.',
419
+ 'This status code is applicable to any HTTP method. It is primarily '\
420
+ 'used to allow the output of a POST action to redirect the user '\
421
+ 'agent to a selected resource, since doing so provides the '\
422
+ 'information corresponding to the POST response in a form that can '\
423
+ 'be separately identified, bookmarked, and cached, independent of '\
424
+ 'the original request.',
425
+ 'A 303 response to a GET request indicates that the origin server '\
426
+ 'does not have a representation of the target resource that can be '\
427
+ 'transferred by the server over HTTP. However, the Location field '\
428
+ 'value refers to a resource that is descriptive of the target '\
429
+ 'resource, such that making a retrieval request on that other '\
430
+ 'resource might result in a representation that is useful to '\
431
+ 'recipients without implying that it represents the original '\
432
+ 'target resource. Note that answers to the questions of what can be '\
433
+ 'represented, what representations are adequate, and what might be '\
434
+ 'a useful description are outside the scope of HTTP.',
435
+ 'Except for responses to a HEAD request, the representation of a '\
436
+ '303 response ought to contain a short hypertext note with a '\
437
+ 'hyperlink to the same URI reference provided in the '\
438
+ 'Location header field.'
439
+ ]
440
+ },
441
+ 304 => {
442
+ title: 'Not Modified',
443
+ description: [
444
+ 'A conditional GET or HEAD request has been received and would '\
445
+ 'have resulted in a 200 OK response if it were not for the fact '\
446
+ 'that the condition evaluated to false.',
447
+ 'In other words, there is no need for the server to transfer a '\
448
+ 'representation of the target resource because the request indicates '\
449
+ 'that the client, which made the request conditional, already has a '\
450
+ 'valid representation; the server is therefore redirecting the client '\
451
+ 'to make use of that stored representation as if it were the payload '\
452
+ 'of a 200 OK response.',
453
+ 'The server generating a 304 response MUST generate any of the '\
454
+ 'following header fields that would have been sent in a 200 OK '\
455
+ 'response to the same request: Cache-Control, Content-Location, Date, '\
456
+ 'ETag, Expires, and Vary.',
457
+ 'Since the goal of a 304 response is to minimize information '\
458
+ 'transfer when the recipient already has one or more cached '\
459
+ 'representations, a sender SHOULD NOT generate representation '\
460
+ 'metadata other than the above listed fields unless said metadata '\
461
+ 'exists for the purpose of guiding cache updates '\
462
+ '(e.g., Last-Modified might be useful if the response does not have '\
463
+ 'an ETag field).', 'Requirements on a cache that receives a 304 '\
464
+ 'response are defined in Section 4.3.4 of RFC7234. If the conditional '\
465
+ 'request originated with an outbound client, such as a user agent '\
466
+ 'with its own cache sending a conditional GET to a shared proxy, '\
467
+ 'then the proxy SHOULD forward the 304 response to that client.',
468
+ 'A 304 response cannot contain a message-body; it is always '\
469
+ 'terminated by the first empty line after the header fields.'
470
+ ]
471
+ },
472
+ 305 => {
473
+ title: 'Use Proxy',
474
+ description: [
475
+ 'Defined in a previous version of this specification and is now '\
476
+ 'deprecated, due to security concerns regarding in-band '\
477
+ 'configuration of a proxy.'
478
+ ]
479
+ },
480
+ 307 => {
481
+ title: 'Temporary Redirect',
482
+ description: [
483
+ 'The target resource resides temporarily under a different URI and '\
484
+ 'the user agent MUST NOT change the request method if it performs an '\
485
+ 'automatic redirection to that URI.',
486
+ 'Since the redirection can change over time, the client ought to '\
487
+ 'continue using the original effective request URI for '\
488
+ 'future requests.', 'The server SHOULD generate a Location header '\
489
+ 'field in the response containing a URI reference for the '\
490
+ 'different URI. The user agent MAY use the Location field value for '\
491
+ "automatic redirection. The server's response payload usually "\
492
+ 'contains a short hypertext note with a hyperlink to '\
493
+ 'the different URI(s).',
494
+ 'Note: This status code is similar to 302 Found, except that it '\
495
+ 'does not allow changing the request method from POST to GET. '\
496
+ 'This specification defines no equivalent counterpart for 301 '\
497
+ 'Moved Permanently (RFC7238, however, proposes defining the status '\
498
+ 'code 308 Permanent Redirect for this purpose).'
499
+ ]
500
+ },
501
+ 308 => {
502
+ title: 'Permanent Redirect',
503
+ description: [
504
+ 'The target resource has been assigned a new permanent URI and '\
505
+ 'any future references to this resource ought to use one of the '\
506
+ 'enclosed URIs.',
507
+ 'Clients with link editing capabilities ought to automatically '\
508
+ 're-link references to the effective request URI to one or more '\
509
+ 'of the new references sent by the server, where possible.',
510
+ 'The server SHOULD generate a Location header field2 in the '\
511
+ 'response containing a preferred URI reference for the new '\
512
+ 'permanent URI. The user agent MAY use the Location field value '\
513
+ "for automatic redirection. The server's response payload usually "\
514
+ 'contains a short hypertext note with a hyperlink to '\
515
+ 'the new URI(s).',
516
+ 'A 308 response is cacheable by default; i.e., unless otherwise '\
517
+ 'indicated by the method definition or explicit cache controls3.',
518
+ 'Note: This status code is similar to 301 Moved Permanently, '\
519
+ 'except that it does not allow changing the request method '\
520
+ 'from POST to GET.'
521
+ ]
522
+ },
523
+ 400 => {
524
+ title: 'Bad Request',
525
+ description: [
526
+ 'The server cannot or will not process the request due to '\
527
+ 'something that is perceived to be a client error '\
528
+ '(e.g., malformed request syntax, invalid request message '\
529
+ 'framing, or deceptive request routing).'
530
+ ]
531
+ },
532
+ 401 => {
533
+ title: 'Unauthorized',
534
+ description: [
535
+ 'The request has not been applied because it lacks valid '\
536
+ 'authentication credentials for the target resource.',
537
+ 'The server generating a 401 response MUST send a '\
538
+ 'WWW-Authenticate header field containing at least one challenge '\
539
+ 'applicable to the target resource.',
540
+ 'If the request included authentication credentials, then the '\
541
+ '401 response indicates that authorization has been refused for '\
542
+ 'those credentials. The user agent MAY repeat the request with a '\
543
+ 'new or replaced Authorization header field2. If the 401 response '\
544
+ 'contains the same challenge as the prior response, and the user '\
545
+ 'agent has already attempted authentication at least once, then '\
546
+ 'the user agent SHOULD present the enclosed representation to the '\
547
+ 'user, since it usually contains relevant diagnostic information.'
548
+ ]
549
+ },
550
+ 402 => {
551
+ title: 'Payment Required',
552
+ description: ['Reserved for future use.']
553
+ },
554
+ 403 => {
555
+ title: 'Forbidden',
556
+ description: [
557
+ 'The server understood the request but refuses to authorize it.',
558
+ 'A server that wishes to make public why the request has been '\
559
+ 'forbidden can describe that reason in the response '\
560
+ 'payload (if any).',
561
+ 'If authentication credentials were provided in the request, '\
562
+ 'the server considers them insufficient to grant access. The '\
563
+ 'client SHOULD NOT automatically repeat the request with the '\
564
+ 'same credentials. The client MAY repeat the request with new '\
565
+ 'or different credentials. However, a request might be forbidden '\
566
+ 'for reasons unrelated to the credentials.',
567
+ 'An origin server that wishes to "hide" the current '\
568
+ 'existence of a forbidden target resource MAY instead respond '\
569
+ 'with a status code of 404 Not Found.'
570
+ ]
571
+ },
572
+ 404 => {
573
+ title: 'Not Found',
574
+ description: [
575
+ 'The origin server did not find a current representation for '\
576
+ 'the target resource or is not willing to disclose '\
577
+ 'that one exists.',
578
+ 'A 404 status code does not indicate whether this lack of '\
579
+ 'representation is temporary or permanent; the 410 Gone '\
580
+ 'status code is preferred over 404 if the origin server knows, '\
581
+ 'presumably through some configurable means, that the condition '\
582
+ 'is likely to be permanent.',
583
+ 'A 404 response is cacheable by default; i.e., unless otherwise '\
584
+ 'indicated by the method definition or explicit cache controls.'
585
+ ]
586
+ },
587
+ 405 => {
588
+ title: 'Method Not Allowed',
589
+ description: [
590
+ 'The method received in the request-line is known by the '\
591
+ 'origin server but not supported by the target resource.',
592
+ 'The origin server MUST generate an Allow header field in a '\
593
+ "405 response containing a list of the target resource's "\
594
+ 'currently supported methods.',
595
+ 'A 405 response is cacheable by default; i.e., unless '\
596
+ 'otherwise indicated by the method definition or explicit '\
597
+ 'cache controls.'
598
+ ]
599
+ },
600
+ 406 => {
601
+ title: 'Not Acceptable',
602
+ description: [
603
+ 'The target resource does not have a current representation '\
604
+ 'that would be acceptable to the user agent, according to '\
605
+ 'the proactive negotiation header fields received in the '\
606
+ 'request, and the server is unwilling to supply a default '\
607
+ 'representation.',
608
+ 'The server SHOULD generate a payload containing a list of '\
609
+ 'available representation characteristics and corresponding '\
610
+ 'resource identifiers from which the user or user agent can '\
611
+ 'choose the one most appropriate. A user agent MAY automatically '\
612
+ 'select the most appropriate choice from that list. However, '\
613
+ 'this specification does not define any standard for such '\
614
+ 'automatic selection, as described in RFC7231 Section 6.4.1.'
615
+ ]
616
+ },
617
+ 407 => {
618
+ title: 'Proxy Authentication Required',
619
+ description: [
620
+ 'Similar to 401 Unauthorized, but it indicates that the '\
621
+ 'client needs to authenticate itself in order to use a proxy.',
622
+ 'The proxy MUST send a Proxy-Authenticate header field '\
623
+ 'containing a challenge applicable to that proxy for the target '\
624
+ 'resource. The client MAY repeat the request with a new or '\
625
+ 'replaced Proxy-Authorization header field2.'
626
+ ]
627
+ },
628
+ 408 => {
629
+ title: 'Request Timeout',
630
+ description: [
631
+ 'The server did not receive a complete request message within '\
632
+ 'the time that it was prepared to wait.',
633
+ 'A server SHOULD send the "close" connection option in the '\
634
+ 'response, since 408 implies that the server has decided to '\
635
+ 'close the connection rather than continue waiting. If the '\
636
+ 'client has an outstanding request in transit, the client MAY '\
637
+ 'repeat that request on a new connection.'
638
+ ]
639
+ },
640
+ 409 => {
641
+ title: 'Conflict',
642
+ description: [
643
+ 'The request could not be completed due to a conflict with '\
644
+ 'the current state of the target resource. This code is used '\
645
+ 'in situations where the user might be able to resolve the '\
646
+ 'conflict and resubmit the request.',
647
+ 'The server SHOULD generate a payload that includes enough '\
648
+ 'information for a user to recognize the source of the conflict.',
649
+ 'Conflicts are most likely to occur in response to a PUT '\
650
+ 'request. For example, if versioning were being used and the '\
651
+ 'representation being PUT included changes to a resource that '\
652
+ 'conflict with those made by an earlier (third-party) request, '\
653
+ 'the origin server might use a 409 response to indicate that it '\
654
+ "can't complete the request. In this case, the response "\
655
+ 'representation would likely contain information useful for '\
656
+ 'merging the differences based on the revision history.'
657
+ ]
658
+ },
659
+ 410 => {
660
+ title: 'Gone',
661
+ description: [
662
+ 'The target resource is no longer available at the origin '\
663
+ 'server and that this condition is likely to be permanent.',
664
+ 'If the origin server does not know, or has no facility to '\
665
+ 'determine, whether or not the condition is permanent, the '\
666
+ 'status code 404 Not Found ought to be used instead.',
667
+ 'The 410 response is primarily intended to assist the task of '\
668
+ 'web maintenance by notifying the recipient that the resource is '\
669
+ 'intentionally unavailable and that the server owners desire that '\
670
+ 'remote links to that resource be removed. Such an event is '\
671
+ 'common for limited-time, promotional services and for resources '\
672
+ 'belonging to individuals no longer associated with the origin '\
673
+ "server's site. It is not necessary to mark all permanently "\
674
+ 'unavailable resources as "gone" or to keep the mark for any '\
675
+ 'length of time -- that is left to the discretion of the '\
676
+ 'server owner.',
677
+ 'A 410 response is cacheable by default; i.e., unless' \
678
+ 'otherwise indicated by the method definition or explicit '\
679
+ 'cache controls.'
680
+ ]
681
+ },
682
+ 411 => {
683
+ title: 'Length Required',
684
+ description: [
685
+ 'The server refuses to accept the request without a defined '\
686
+ 'Content-Length.',
687
+ 'The client MAY repeat the request if it adds a valid '\
688
+ 'Content-Length header field containing the length of the '\
689
+ 'message body in the request message.'
690
+ ]
691
+ },
692
+ 412 => {
693
+ title: 'Precondition Failed',
694
+ description: [
695
+ 'One or more conditions given in the request header fields '\
696
+ 'evaluated to false when tested on the server.',
697
+ 'This response code allows the client to place preconditions '\
698
+ 'on the current resource state (its current representations and '\
699
+ 'metadata) and, thus, prevent the request method from being '\
700
+ 'applied if the target resource is in an unexpected state.'
701
+ ]
702
+ },
703
+ 413 => {
704
+ title: 'Payload Too Large',
705
+ description: [
706
+ 'The server is refusing to process a request because the request '\
707
+ 'payload is larger than the server is willing or able to process.',
708
+ 'The server MAY close the connection to prevent the client from '\
709
+ 'continuing the request.',
710
+ 'If the condition is temporary, the server SHOULD generate a '\
711
+ 'Retry-After header field to indicate that it is temporary and '\
712
+ 'after what time the client MAY try again.'
713
+ ]
714
+ },
715
+ 414 => {
716
+ title: 'Request-URI Too Long',
717
+ description: [
718
+ 'The server is refusing to service the request because '\
719
+ 'the request-target is longer than the server is willing '\
720
+ 'to interpret.',
721
+ 'This rare condition is only likely to occur when a client '\
722
+ 'has improperly converted a POST request to a GET request with '\
723
+ 'long query information, when the client has descended into '\
724
+ 'a "black hole" of redirection (e.g., a redirected URI prefix '\
725
+ 'that points to a suffix of itself) or when the server is under '\
726
+ 'attack by a client attempting to exploit potential '\
727
+ 'security holes.', 'A 414 response is cacheable by default; i.e., '\
728
+ 'unless otherwise indicated by the method definition or explicit '\
729
+ 'cache controls 2.'
730
+ ]
731
+ },
732
+ 415 => {
733
+ title: 'Unsupported Media Type',
734
+ description: [
735
+ 'The origin server is refusing to service the request because '\
736
+ 'the payload is in a format not supported by this method on '\
737
+ 'the target resource.',
738
+ "The format problem might be due to the request's indicated "\
739
+ 'Content-Type or Content-Encoding, or as a result of inspecting '\
740
+ 'the data directly.'
741
+ ]
742
+ },
743
+ 416 => {
744
+ title: 'Requested Range Not Satisfiable',
745
+ description: [
746
+ "None of the ranges in the request's Range header field overlap "\
747
+ 'the current extent of the selected resource or that the set of '\
748
+ 'ranges requested has been rejected due to invalid ranges or an '\
749
+ 'excessive request of small or overlapping ranges.',
750
+ 'For byte ranges, failing to overlap the current extent means '\
751
+ 'that the first-byte-pos of all of the byte-range-spec values '\
752
+ 'were greater than the current length of the selected '\
753
+ 'representation. When this status code is generated in response '\
754
+ 'to a byte-range request, the sender SHOULD generate a '\
755
+ 'Content-Range header field specifying the current length of '\
756
+ 'the selected representation2.',
757
+ 'For example:',
758
+ 'Note: Because servers are free to ignore Range, many '\
759
+ 'implementations will simply respond with the entire selected '\
760
+ 'representation in a 200 OK response. That is partly because '\
761
+ 'most clients are prepared to receive a 200 OK to complete the '\
762
+ 'task (albeit less efficiently) and partly because clients might '\
763
+ 'not stop making an invalid partial request until they have '\
764
+ 'received a complete representation. Thus, clients cannot depend '\
765
+ 'on receiving a 416 Range Not Satisfiable response even when it '\
766
+ 'is most appropriate.'
767
+ ]
768
+ },
769
+ 417 => {
770
+ title: 'Expectation Failed',
771
+ description: [
772
+ "The expectation given in the request's Expect header field "\
773
+ 'could not be met by at least one of the inbound servers.'
774
+ ]
775
+ },
776
+ 418 => {
777
+ title: "I'm a teapot",
778
+ description: [
779
+ 'Any attempt to brew coffee with a teapot should result in the '\
780
+ "error code \"418 I'm a teapot\". The resulting entity body "\
781
+ 'MAY be short and stout.'
782
+ ]
783
+ },
784
+ 421 => {
785
+ title: 'Misdirected Request',
786
+ description: [
787
+ 'The request was directed at a server that is not able to produce a '\
788
+ 'response. This can be sent by a server that is not configured to '\
789
+ 'produce responses for the combination of scheme and authority that '\
790
+ 'are included in the request URI.',
791
+ 'Clients receiving a 421 Misdirected Request response from a server '\
792
+ 'MAY retry the request -- whether the request method is idempotent '\
793
+ 'or not -- over a different connection. This is possible if a '\
794
+ 'connection is reusedor if an alternative service is selected ALT-SVC.',
795
+ 'This status code MUST NOT be generated by proxies.',
796
+ 'A 421 response is cacheable by default, i.e., unless otherwise '\
797
+ 'indicated by the method definition or explicit cache controls2.'
798
+ ]
799
+ },
800
+ 422 => {
801
+ title: 'Unprocessable Entity',
802
+ description: [
803
+ 'The server understands the content type of the request '\
804
+ 'entity (hence a 415 Unsupported Media Type status code is '\
805
+ 'inappropriate), and the syntax of the request entity is '\
806
+ 'correct (thus a 400 Bad Request status code is inappropriate) '\
807
+ 'but was unable to process the contained instructions.',
808
+ 'For example, this error condition may occur if an XML request '\
809
+ 'body contains well-formed (i.e., syntactically correct), but '\
810
+ 'semantically erroneous, XML instructions.'
811
+ ]
812
+ },
813
+ 423 => {
814
+ title: 'Locked',
815
+ description: [
816
+ 'The source or destination resource of a method is locked.',
817
+ 'This response SHOULD contain an appropriate precondition or '\
818
+ "postcondition code, such as 'lock-token-submitted' "\
819
+ "or 'no-conflicting-lock'."
820
+ ]
821
+ },
822
+ 424 => {
823
+ title: 'Failed Dependency',
824
+ description: [
825
+ 'The method could not be performed on the resource because the '\
826
+ 'requested action depended on another action and that '\
827
+ 'action failed.',
828
+ 'For example, if a command in a PROPPATCH method fails, then, '\
829
+ 'at minimum, the rest of the commands will also fail with 424 '\
830
+ 'Failed Dependency.'
831
+ ]
832
+ },
833
+ 426 => {
834
+ title: 'Upgrade Required',
835
+ description: [
836
+ 'The server refuses to perform the request using the current '\
837
+ 'protocol but might be willing to do so after the client upgrades '\
838
+ 'to a different protocol.',
839
+ 'The server MUST send an Upgrade header field in a 426 response '\
840
+ 'to indicate the required protocol(s)',
841
+ 'Example:'
842
+ ]
843
+ },
844
+ 428 => {
845
+ title: 'Precondition Required',
846
+ description: [
847
+ 'The origin server requires the request to be conditional.',
848
+ 'Its typical use is to avoid the "lost update" problem, where '\
849
+ "a client GETs a resource's state, modifies it, and PUTs it back "\
850
+ 'to the server, when meanwhile a third party has modified the '\
851
+ 'state on the server, leading to a conflict. By requiring requests '\
852
+ 'to be conditional, the server can assure that clients are working '\
853
+ 'with the correct copies.',
854
+ 'Responses using this status code SHOULD explain how to resubmit '\
855
+ 'the request successfully. For example:',
856
+ 'Responses with the 428 status code MUST NOT be stored by a cache.'
857
+ ]
858
+ },
859
+ 429 => {
860
+ title: 'Too Many Requests',
861
+ description: [
862
+ 'The user has sent too many requests in a given amount of time '\
863
+ '("rate limiting").', 'The response representations SHOULD '\
864
+ 'include details explaining the condition, and MAY include a '\
865
+ 'Retry-After header indicating how long to wait before making a '\
866
+ 'new request.',
867
+ 'For example:',
868
+ 'Note that this specification does not define how the origin '\
869
+ 'server identifies the user, nor how it counts requests. For '\
870
+ 'example, an origin server that is limiting request rates can do '\
871
+ 'so based upon counts of requests on a per-resource basis, '\
872
+ 'across the entire server, or even among a set of servers. '\
873
+ 'Likewise, it might identify the user by its authentication '\
874
+ 'credentials, or a stateful cookie.',
875
+ 'Responses with the 429 status code MUST NOT be '\
876
+ 'stored by a cache.'
877
+ ]
878
+ },
879
+ 431 => {
880
+ title: 'Request Header Fields Too Large',
881
+ description: [
882
+ 'The server is unwilling to process the request because its '\
883
+ 'header fields are too large. The request MAY be resubmitted '\
884
+ 'after reducing the size of the request header fields.',
885
+ 'It can be used both when the set of request header fields in '\
886
+ 'total is too large, and when a single header field is at fault. '\
887
+ 'In the latter case, the response representation SHOULD specify '\
888
+ 'which header field was too large.',
889
+ 'For example:',
890
+ 'Responses with the 431 status code MUST NOT be stored by a cache.'
891
+ ]
892
+ },
893
+ 444 => {
894
+ title: 'Connection Closed Without Response',
895
+ description: [
896
+ 'A non-standard status code used to instruct nginx to close the '\
897
+ 'connection without sending a response to the client, most '\
898
+ 'commonly used to deny malicious or malformed requests.',
899
+ 'This status code is not seen by the client, it only appears '\
900
+ 'in nginx log files.'
901
+ ]
902
+ },
903
+ 451 => {
904
+ title: 'Unavailable For Legal Reasons',
905
+ description: [
906
+ 'The server is denying access to the resource as a consequence '\
907
+ 'of a legal demand.',
908
+ 'The server in question might not be an origin server. '\
909
+ 'This type of legal demand typically most directly affects the '\
910
+ 'operations of ISPs and search engines.',
911
+ 'Responses using this status code SHOULD include an explanation, '\
912
+ 'in the response body, of the details of the legal demand: the '\
913
+ 'party making it, the applicable legislation or regulation, and '\
914
+ 'what classes of person and resource it applies to. For example:',
915
+ 'The use of the 451 status code implies neither the existence '\
916
+ 'nor non- existence of the resource named in the request. '\
917
+ 'That is to say, it is possible that if the legal demands '\
918
+ 'were removed, a request for the resource still might not succeed.',
919
+ 'Note that in many cases clients can still access the denied '\
920
+ 'resource by using technical countermeasures such as a VPN or '\
921
+ 'the Tor network.',
922
+ 'A 451 response is cacheable by default; i.e., unless otherwise '\
923
+ 'indicated by the method definition or explicit cache controls; '\
924
+ 'see RFC7234.'
925
+ ]
926
+ },
927
+ 499 => {
928
+ title: 'Client Closed Request',
929
+ description: [
930
+ 'A non-standard status code introduced by nginx for the case '\
931
+ 'when a client closes the connection while nginx is processing '\
932
+ 'the request.'
933
+ ]
934
+ },
935
+ 500 => {
936
+ title: 'Internal Server Error',
937
+ description: [
938
+ 'The server encountered an unexpected condition that prevented '\
939
+ 'it from fulfilling the request.'
940
+ ]
941
+ },
942
+ 501 => {
943
+ title: 'Not Implemented',
944
+ description: [
945
+ 'The server does not support the functionality required to '\
946
+ 'fulfill the request.',
947
+ 'This is the appropriate response when the server does not '\
948
+ 'recognize the request method and is not capable of supporting '\
949
+ 'it for any resource.',
950
+ 'A 501 response is cacheable by default; i.e., unless otherwise '\
951
+ 'indicated by the method definition or explicit cache controls.'
952
+ ]
953
+ },
954
+ 502 => {
955
+ title: 'Bad Gateway',
956
+ description: [
957
+ 'The server, while acting as a gateway or proxy, received an '\
958
+ 'invalid response from an inbound server it accessed while '\
959
+ 'attempting to fulfill the request.'
960
+ ]
961
+ },
962
+ 503 => {
963
+ title: 'Service Unavailable',
964
+ description: [
965
+ 'The server is currently unable to handle the request due to '\
966
+ 'a temporary overload or scheduled maintenance, which will likely '\
967
+ 'be alleviated after some delay.',
968
+ 'The server MAY send a Retry-After header field to suggest an '\
969
+ 'appropriate amount of time for the client to wait before '\
970
+ 'retrying the request.',
971
+ 'Note: The existence of the 503 status code does not imply that '\
972
+ 'a server has to use it when becoming overloaded. Some servers '\
973
+ 'might simply refuse the connection.'
974
+ ]
975
+ },
976
+ 504 => {
977
+ title: 'Gateway Timeout',
978
+ description: [
979
+ 'The server, while acting as a gateway or proxy, did not '\
980
+ 'receive a timely response from an upstream server it needed '\
981
+ 'to access in order to complete the request.'
982
+ ]
983
+ },
984
+ 505 => {
985
+ title: 'HTTP Version Not Supported',
986
+ description: [
987
+ 'The server does not support, or refuses to support, the major '\
988
+ 'version of HTTP that was used in the request message.',
989
+ 'The server is indicating that it is unable or unwilling to complete '\
990
+ 'the request using the same major version as the client, as described '\
991
+ 'in Section 2.6 of RFC7230, other than with this error message. The '\
992
+ 'server SHOULD generate a representation for the 505 response that '\
993
+ 'describes why that version is not supported and what other protocols '\
994
+ 'are supported by that server.'
995
+ ]
996
+ },
997
+ 506 => {
998
+ title: 'Variant Also Negotiates',
999
+ description: [
1000
+ 'The server has an internal configuration error: the chosen variant '\
1001
+ 'resource is configured to engage in transparent content negotiation '\
1002
+ 'itself, and is therefore not a proper end point in the '\
1003
+ 'negotiation process.'
1004
+ ]
1005
+ },
1006
+ 507 => {
1007
+ title: 'Insufficient Storage',
1008
+ description: [
1009
+ 'The method could not be performed on the resource because the '\
1010
+ 'server is unable to store the representation needed to successfully '\
1011
+ 'complete the request.',
1012
+ 'This condition is considered to be temporary. If the request that '\
1013
+ 'received this status code was the result of a user action, the '\
1014
+ 'request MUST NOT be repeated until it is requested by a '\
1015
+ 'separate user action.'
1016
+ ]
1017
+ },
1018
+ 508 => {
1019
+ title: 'Loop Detected',
1020
+ description: [
1021
+ 'The server terminated an operation because it encountered an '\
1022
+ 'infinite loop while processing a request with "Depth: infinity". '\
1023
+ 'This status indicates that the entire operation failed.'
1024
+ ]
1025
+ },
1026
+ 510 => {
1027
+ title: 'Not Extended',
1028
+ description: [
1029
+ 'The policy for accessing the resource has not been met in the '\
1030
+ 'request. The server should send back all the information necessary '\
1031
+ 'for the client to issue an extended request.',
1032
+ 'It is outside the scope of this specification to specify how the '\
1033
+ 'extensions inform the client.', 'If the 510 response contains '\
1034
+ 'information about extensions that were not present in the initial '\
1035
+ 'request then the client MAY repeat the request if it has reason to '\
1036
+ 'believe it can fulfill the extension policy by modifying the request '\
1037
+ 'according to the information provided in the 510 response. Otherwise '\
1038
+ 'the client MAY present any entity included in the 510 response to '\
1039
+ 'the user, since that entity may include relevant'\
1040
+ ' diagnostic information.'
1041
+ ]
1042
+ },
1043
+ 511 => {
1044
+ title: 'Network Authentication Required',
1045
+ description: [
1046
+ 'The client needs to authenticate to gain network access.',
1047
+ 'The response representation SHOULD contain a link to a resource '\
1048
+ 'that allows the user to submit credentials (e.g., with an HTML form).',
1049
+ 'Note that the 511 response SHOULD NOT contain a challenge or the '\
1050
+ 'login interface itself, because browsers would show the login '\
1051
+ 'interface as being associated with the originally requested URL, '\
1052
+ 'which may cause confusion.',
1053
+ 'The 511 status SHOULD NOT be generated by origin servers; '\
1054
+ 'it is intended for use by intercepting proxies that are interposed '\
1055
+ 'as a means of controlling access to the network.',
1056
+ 'Responses with the 511 status code MUST NOT be stored by a cache.',
1057
+ 'The 511 status code is designed to mitigate problems caused '\
1058
+ 'by "captive portals" to software (especially non-browser agents) '\
1059
+ 'that is expecting a response from the server that a request was made '\
1060
+ 'to, not the intervening network infrastructure. It is not intended '\
1061
+ 'to encourage deployment of captive portals -- only to limit the '\
1062
+ 'damage caused by them.',
1063
+ 'A network operator wishing to require some '\
1064
+ 'authentication, acceptance of terms, or other user interaction '\
1065
+ 'before granting access usually does so by identifying clients '\
1066
+ 'who have not done so ("unknown clients") using their Media Access '\
1067
+ 'Control (MAC) addresses.',
1068
+ 'Unknown clients then have all traffic blocked, except for that on '\
1069
+ 'TCP port 80, which is sent to an HTTP server (the "login server") '\
1070
+ 'dedicated to "logging in" unknown clients, and of course traffic '\
1071
+ 'to the login server itself.',
1072
+ 'For example, a user agent might connect to a network and make the '\
1073
+ 'following HTTP request on TCP port 80:', 'Upon receiving such a '\
1074
+ 'request, the login server would generate a 511 response:',
1075
+ 'Here, the 511 status code assures that non-browser clients will '\
1076
+ 'not interpret the response as being from the origin server, and the '\
1077
+ 'META HTML element redirects the user agent to the login server.'
1078
+ ]
1079
+ },
1080
+ 599 => {
1081
+ title: 'Network Connect Timeout Error',
1082
+ description: [
1083
+ 'This status code is not specified in any RFCs, but is used by some '\
1084
+ 'HTTP proxies to signal a network connect timeout behind the proxy to '\
1085
+ 'a client in front of the proxy.'
1086
+ ]
1087
+ }
1088
+ }.freeze
1089
+ end