@@ -20,7 +20,7 @@ use std::fmt;
20
20
use std:: num:: NonZeroU16 ;
21
21
use std:: str:: FromStr ;
22
22
23
- /// An HTTP status code (`status-code` in RFC 7230 et al.).
23
+ /// An HTTP status code (`status-code` in RFC 9110 et al.).
24
24
///
25
25
/// Constants are provided for known status codes, including those in the IANA
26
26
/// [HTTP Status Code Registry](
@@ -326,195 +326,195 @@ macro_rules! status_codes {
326
326
327
327
status_codes ! {
328
328
/// 100 Continue
329
- /// [[RFC7231 , Section 6 .2.1](https://tools .ietf.org/html/rfc7231 #section-6 .2.1)]
329
+ /// [[RFC9110 , Section 15 .2.1](https://datatracker .ietf.org/doc/ html/rfc9110 #section-15 .2.1)]
330
330
( 100 , CONTINUE , "Continue" ) ;
331
331
/// 101 Switching Protocols
332
- /// [[RFC7231 , Section 6 .2.2](https://tools .ietf.org/html/rfc7231 #section-6 .2.2)]
332
+ /// [[RFC9110 , Section 15 .2.2](https://datatracker .ietf.org/doc/ html/rfc9110 #section-15 .2.2)]
333
333
( 101 , SWITCHING_PROTOCOLS , "Switching Protocols" ) ;
334
334
/// 102 Processing
335
- /// [[RFC2518](https://tools .ietf.org/html/rfc2518)]
335
+ /// [[RFC2518, Section 10.1 ](https://datatracker .ietf.org/doc/ html/rfc2518#section-10.1 )]
336
336
( 102 , PROCESSING , "Processing" ) ;
337
337
338
338
/// 200 OK
339
- /// [[RFC7231 , Section 6 .3.1](https://tools .ietf.org/html/rfc7231 #section-6 .3.1)]
339
+ /// [[RFC9110 , Section 15 .3.1](https://datatracker .ietf.org/doc/ html/rfc9110 #section-15 .3.1)]
340
340
( 200 , OK , "OK" ) ;
341
341
/// 201 Created
342
- /// [[RFC7231 , Section 6 .3.2](https://tools .ietf.org/html/rfc7231 #section-6 .3.2)]
342
+ /// [[RFC9110 , Section 15 .3.2](https://datatracker .ietf.org/doc/ html/rfc9110 #section-15 .3.2)]
343
343
( 201 , CREATED , "Created" ) ;
344
344
/// 202 Accepted
345
- /// [[RFC7231 , Section 6 .3.3](https://tools .ietf.org/html/rfc7231 #section-6 .3.3)]
345
+ /// [[RFC9110 , Section 15 .3.3](https://datatracker .ietf.org/doc/ html/rfc9110 #section-15 .3.3)]
346
346
( 202 , ACCEPTED , "Accepted" ) ;
347
347
/// 203 Non-Authoritative Information
348
- /// [[RFC7231 , Section 6 .3.4](https://tools .ietf.org/html/rfc7231 #section-6 .3.4)]
348
+ /// [[RFC9110 , Section 15 .3.4](https://datatracker .ietf.org/doc/ html/rfc9110 #section-15 .3.4)]
349
349
( 203 , NON_AUTHORITATIVE_INFORMATION , "Non Authoritative Information" ) ;
350
350
/// 204 No Content
351
- /// [[RFC7231 , Section 6 .3.5](https://tools .ietf.org/html/rfc7231 #section-6 .3.5)]
351
+ /// [[RFC9110 , Section 15 .3.5](https://datatracker .ietf.org/doc/ html/rfc9110 #section-15 .3.5)]
352
352
( 204 , NO_CONTENT , "No Content" ) ;
353
353
/// 205 Reset Content
354
- /// [[RFC7231 , Section 6 .3.6](https://tools .ietf.org/html/rfc7231 #section-6 .3.6)]
354
+ /// [[RFC9110 , Section 15 .3.6](https://datatracker .ietf.org/doc/ html/rfc9110 #section-15 .3.6)]
355
355
( 205 , RESET_CONTENT , "Reset Content" ) ;
356
356
/// 206 Partial Content
357
- /// [[RFC7233 , Section 4.1 ](https://tools .ietf.org/html/rfc7233 #section-4.1 )]
357
+ /// [[RFC9110 , Section 15.3.7 ](https://datatracker .ietf.org/doc/ html/rfc9110 #section-15.3.7 )]
358
358
( 206 , PARTIAL_CONTENT , "Partial Content" ) ;
359
359
/// 207 Multi-Status
360
- /// [[RFC4918](https://tools .ietf.org/html/rfc4918)]
360
+ /// [[RFC4918, Section 11.1 ](https://datatracker .ietf.org/doc/ html/rfc4918#section-11.1 )]
361
361
( 207 , MULTI_STATUS , "Multi-Status" ) ;
362
362
/// 208 Already Reported
363
- /// [[RFC5842](https://tools .ietf.org/html/rfc5842)]
363
+ /// [[RFC5842, Section 7.1 ](https://datatracker .ietf.org/doc/ html/rfc5842#section-7.1 )]
364
364
( 208 , ALREADY_REPORTED , "Already Reported" ) ;
365
365
366
366
/// 226 IM Used
367
- /// [[RFC3229](https://tools .ietf.org/html/rfc3229)]
367
+ /// [[RFC3229, Section 10.4.1 ](https://datatracker .ietf.org/doc/ html/rfc3229#section-10.4.1 )]
368
368
( 226 , IM_USED , "IM Used" ) ;
369
369
370
370
/// 300 Multiple Choices
371
- /// [[RFC7231 , Section 6 .4.1](https://tools .ietf.org/html/rfc7231 #section-6 .4.1)]
371
+ /// [[RFC9110 , Section 15 .4.1](https://datatracker .ietf.org/doc/ html/rfc9110 #section-15 .4.1)]
372
372
( 300 , MULTIPLE_CHOICES , "Multiple Choices" ) ;
373
373
/// 301 Moved Permanently
374
- /// [[RFC7231 , Section 6 .4.2](https://tools .ietf.org/html/rfc7231 #section-6 .4.2)]
374
+ /// [[RFC9110 , Section 15 .4.2](https://datatracker .ietf.org/doc/ html/rfc9110 #section-15 .4.2)]
375
375
( 301 , MOVED_PERMANENTLY , "Moved Permanently" ) ;
376
376
/// 302 Found
377
- /// [[RFC7231 , Section 6 .4.3](https://tools .ietf.org/html/rfc7231 #section-6 .4.3)]
377
+ /// [[RFC9110 , Section 15 .4.3](https://datatracker .ietf.org/doc/ html/rfc9110 #section-15 .4.3)]
378
378
( 302 , FOUND , "Found" ) ;
379
379
/// 303 See Other
380
- /// [[RFC7231 , Section 6 .4.4](https://tools .ietf.org/html/rfc7231 #section-6 .4.4)]
380
+ /// [[RFC9110 , Section 15 .4.4](https://datatracker .ietf.org/doc/ html/rfc9110 #section-15 .4.4)]
381
381
( 303 , SEE_OTHER , "See Other" ) ;
382
382
/// 304 Not Modified
383
- /// [[RFC7232 , Section 4.1 ](https://tools .ietf.org/html/rfc7232 #section-4.1 )]
383
+ /// [[RFC9110 , Section 15.4.5 ](https://datatracker .ietf.org/doc/ html/rfc9110 #section-15.4.5 )]
384
384
( 304 , NOT_MODIFIED , "Not Modified" ) ;
385
385
/// 305 Use Proxy
386
- /// [[RFC7231 , Section 6 .4.5 ](https://tools .ietf.org/html/rfc7231 #section-6 .4.5 )]
386
+ /// [[RFC9110 , Section 15 .4.6 ](https://datatracker .ietf.org/doc/ html/rfc9110 #section-15 .4.6 )]
387
387
( 305 , USE_PROXY , "Use Proxy" ) ;
388
388
/// 307 Temporary Redirect
389
- /// [[RFC7231 , Section 6 .4.7](https://tools .ietf.org/html/rfc7231 #section-6 .4.7)]
389
+ /// [[RFC9110 , Section 15 .4.7](https://datatracker .ietf.org/doc/ html/rfc9110 #section-15 .4.7)]
390
390
( 307 , TEMPORARY_REDIRECT , "Temporary Redirect" ) ;
391
391
/// 308 Permanent Redirect
392
- /// [[RFC7238 ](https://tools .ietf.org/html/rfc7238 )]
392
+ /// [[RFC9110, Section 15.4.8 ](https://datatracker .ietf.org/doc/ html/rfc9110#section-15.4.8 )]
393
393
( 308 , PERMANENT_REDIRECT , "Permanent Redirect" ) ;
394
394
395
395
/// 400 Bad Request
396
- /// [[RFC7231 , Section 6 .5.1](https://tools .ietf.org/html/rfc7231 #section-6 .5.1)]
396
+ /// [[RFC9110 , Section 15 .5.1](https://datatracker .ietf.org/doc/ html/rfc9110 #section-15 .5.1)]
397
397
( 400 , BAD_REQUEST , "Bad Request" ) ;
398
398
/// 401 Unauthorized
399
- /// [[RFC7235 , Section 3.1 ](https://tools .ietf.org/html/rfc7235 #section-3.1 )]
399
+ /// [[RFC9110 , Section 15.5.2 ](https://datatracker .ietf.org/doc/ html/rfc9110 #section-15.5.2 )]
400
400
( 401 , UNAUTHORIZED , "Unauthorized" ) ;
401
401
/// 402 Payment Required
402
- /// [[RFC7231 , Section 6 .5.2 ](https://tools .ietf.org/html/rfc7231 #section-6 .5.2 )]
402
+ /// [[RFC9110 , Section 15 .5.3 ](https://datatracker .ietf.org/doc/ html/rfc9110 #section-15 .5.3 )]
403
403
( 402 , PAYMENT_REQUIRED , "Payment Required" ) ;
404
404
/// 403 Forbidden
405
- /// [[RFC7231 , Section 6 .5.3 ](https://tools .ietf.org/html/rfc7231 #section-6 .5.3 )]
405
+ /// [[RFC9110 , Section 15 .5.4 ](https://datatracker .ietf.org/doc/ html/rfc9110 #section-15 .5.4 )]
406
406
( 403 , FORBIDDEN , "Forbidden" ) ;
407
407
/// 404 Not Found
408
- /// [[RFC7231 , Section 6 .5.4 ](https://tools .ietf.org/html/rfc7231 #section-6 .5.4 )]
408
+ /// [[RFC9110 , Section 15 .5.5 ](https://datatracker .ietf.org/doc/ html/rfc9110 #section-15 .5.5 )]
409
409
( 404 , NOT_FOUND , "Not Found" ) ;
410
410
/// 405 Method Not Allowed
411
- /// [[RFC7231 , Section 6 .5.5 ](https://tools .ietf.org/html/rfc7231 #section-6 .5.5 )]
411
+ /// [[RFC9110 , Section 15 .5.6 ](https://datatracker .ietf.org/doc/ html/rfc9110 #section-15 .5.6 )]
412
412
( 405 , METHOD_NOT_ALLOWED , "Method Not Allowed" ) ;
413
413
/// 406 Not Acceptable
414
- /// [[RFC7231 , Section 6 .5.6 ](https://tools .ietf.org/html/rfc7231 #section-6 .5.6 )]
414
+ /// [[RFC9110 , Section 15 .5.7 ](https://datatracker .ietf.org/doc/ html/rfc9110 #section-15 .5.7 )]
415
415
( 406 , NOT_ACCEPTABLE , "Not Acceptable" ) ;
416
416
/// 407 Proxy Authentication Required
417
- /// [[RFC7235 , Section 3.2 ](https://tools .ietf.org/html/rfc7235 #section-3.2 )]
417
+ /// [[RFC9110 , Section 15.5.8 ](https://datatracker .ietf.org/doc/ html/rfc9110 #section-15.5.8 )]
418
418
( 407 , PROXY_AUTHENTICATION_REQUIRED , "Proxy Authentication Required" ) ;
419
419
/// 408 Request Timeout
420
- /// [[RFC7231 , Section 6 .5.7 ](https://tools .ietf.org/html/rfc7231 #section-6 .5.7 )]
420
+ /// [[RFC9110 , Section 15 .5.9 ](https://datatracker .ietf.org/doc/ html/rfc9110 #section-15 .5.9 )]
421
421
( 408 , REQUEST_TIMEOUT , "Request Timeout" ) ;
422
422
/// 409 Conflict
423
- /// [[RFC7231 , Section 6 .5.8 ](https://tools .ietf.org/html/rfc7231 #section-6 .5.8 )]
423
+ /// [[RFC9110 , Section 15 .5.10 ](https://datatracker .ietf.org/doc/ html/rfc9110 #section-15 .5.10 )]
424
424
( 409 , CONFLICT , "Conflict" ) ;
425
425
/// 410 Gone
426
- /// [[RFC7231 , Section 6 .5.9 ](https://tools .ietf.org/html/rfc7231 #section-6 .5.9 )]
426
+ /// [[RFC9110 , Section 15 .5.11 ](https://datatracker .ietf.org/doc/ html/rfc9110 #section-15 .5.11 )]
427
427
( 410 , GONE , "Gone" ) ;
428
428
/// 411 Length Required
429
- /// [[RFC7231 , Section 6 .5.10 ](https://tools .ietf.org/html/rfc7231 #section-6 .5.10 )]
429
+ /// [[RFC9110 , Section 15 .5.12 ](https://datatracker .ietf.org/doc/ html/rfc9110 #section-15 .5.12 )]
430
430
( 411 , LENGTH_REQUIRED , "Length Required" ) ;
431
431
/// 412 Precondition Failed
432
- /// [[RFC7232 , Section 4.2 ](https://tools .ietf.org/html/rfc7232 #section-4.2 )]
432
+ /// [[RFC9110 , Section 15.5.13 ](https://datatracker .ietf.org/doc/ html/rfc9110 #section-15.5.13 )]
433
433
( 412 , PRECONDITION_FAILED , "Precondition Failed" ) ;
434
434
/// 413 Payload Too Large
435
- /// [[RFC7231 , Section 6 .5.11 ](https://tools .ietf.org/html/rfc7231 #section-6 .5.11 )]
435
+ /// [[RFC9110 , Section 15 .5.14 ](https://datatracker .ietf.org/doc/ html/rfc9110 #section-15 .5.14 )]
436
436
( 413 , PAYLOAD_TOO_LARGE , "Payload Too Large" ) ;
437
437
/// 414 URI Too Long
438
- /// [[RFC7231 , Section 6 .5.12 ](https://tools .ietf.org/html/rfc7231 #section-6 .5.12 )]
438
+ /// [[RFC9110 , Section 15 .5.15 ](https://datatracker .ietf.org/doc/ html/rfc9110 #section-15 .5.15 )]
439
439
( 414 , URI_TOO_LONG , "URI Too Long" ) ;
440
440
/// 415 Unsupported Media Type
441
- /// [[RFC7231 , Section 6 .5.13 ](https://tools .ietf.org/html/rfc7231 #section-6 .5.13 )]
441
+ /// [[RFC9110 , Section 15 .5.16 ](https://datatracker .ietf.org/doc/ html/rfc9110 #section-15 .5.16 )]
442
442
( 415 , UNSUPPORTED_MEDIA_TYPE , "Unsupported Media Type" ) ;
443
443
/// 416 Range Not Satisfiable
444
- /// [[RFC7233 , Section 4.4 ](https://tools .ietf.org/html/rfc7233 #section-4.4 )]
444
+ /// [[RFC9110 , Section 15.5.17 ](https://datatracker .ietf.org/doc/ html/rfc9110 #section-15.5.17 )]
445
445
( 416 , RANGE_NOT_SATISFIABLE , "Range Not Satisfiable" ) ;
446
446
/// 417 Expectation Failed
447
- /// [[RFC7231 , Section 6 .5.14 ](https://tools .ietf.org/html/rfc7231 #section-6 .5.14 )]
447
+ /// [[RFC9110 , Section 15 .5.18 ](https://datatracker .ietf.org/doc/ html/rfc9110 #section-15 .5.18 )]
448
448
( 417 , EXPECTATION_FAILED , "Expectation Failed" ) ;
449
449
/// 418 I'm a teapot
450
- /// [curiously not registered by IANA but [RFC2324](https://tools .ietf.org/html/rfc2324)]
450
+ /// [curiously not registered by IANA but [RFC2324, Section 2.3.2 ](https://datatracker .ietf.org/doc/ html/rfc2324#section-2.3.2 )]
451
451
( 418 , IM_A_TEAPOT , "I'm a teapot" ) ;
452
452
453
453
/// 421 Misdirected Request
454
- /// [RFC7540 , Section 9.1.2 ](https://tools .ietf.org/html/rfc7540 #section-9.1.2)
454
+ /// [[RFC9110 , Section 15.5.20 ](https://datatracker .ietf.org/doc/ html/rfc9110 #section-15.5.20)]
455
455
( 421 , MISDIRECTED_REQUEST , "Misdirected Request" ) ;
456
456
/// 422 Unprocessable Entity
457
- /// [[RFC4918 ](https://tools .ietf.org/html/rfc4918 )]
457
+ /// [[RFC9110, Section 15.5.21 ](https://datatracker .ietf.org/doc/ html/rfc9110#section-15.5.21 )]
458
458
( 422 , UNPROCESSABLE_ENTITY , "Unprocessable Entity" ) ;
459
459
/// 423 Locked
460
- /// [[RFC4918](https://tools .ietf.org/html/rfc4918)]
460
+ /// [[RFC4918, Section 11.3 ](https://datatracker .ietf.org/doc/ html/rfc4918#section-11.3 )]
461
461
( 423 , LOCKED , "Locked" ) ;
462
462
/// 424 Failed Dependency
463
- /// [[RFC4918](https://tools.ietf.org/html/rfc4918)]
463
+ /// [[RFC4918, Section 11.4 ](https://tools.ietf.org/html/rfc4918#section-11.4 )]
464
464
( 424 , FAILED_DEPENDENCY , "Failed Dependency" ) ;
465
465
466
466
/// 426 Upgrade Required
467
- /// [[RFC7231 , Section 6 .5.15 ](https://tools .ietf.org/html/rfc7231 #section-6 .5.15 )]
467
+ /// [[RFC9110 , Section 15 .5.22 ](https://datatracker .ietf.org/doc/ html/rfc9110 #section-15 .5.22 )]
468
468
( 426 , UPGRADE_REQUIRED , "Upgrade Required" ) ;
469
469
470
470
/// 428 Precondition Required
471
- /// [[RFC6585](https://tools .ietf.org/html/rfc6585)]
471
+ /// [[RFC6585, Section 3 ](https://datatracker .ietf.org/doc/ html/rfc6585#section-3 )]
472
472
( 428 , PRECONDITION_REQUIRED , "Precondition Required" ) ;
473
473
/// 429 Too Many Requests
474
- /// [[RFC6585](https://tools .ietf.org/html/rfc6585)]
474
+ /// [[RFC6585, Section 4 ](https://datatracker .ietf.org/doc/ html/rfc6585#section-4 )]
475
475
( 429 , TOO_MANY_REQUESTS , "Too Many Requests" ) ;
476
476
477
477
/// 431 Request Header Fields Too Large
478
- /// [[RFC6585](https://tools .ietf.org/html/rfc6585)]
478
+ /// [[RFC6585, Section 5 ](https://datatracker .ietf.org/doc/ html/rfc6585#section-5 )]
479
479
( 431 , REQUEST_HEADER_FIELDS_TOO_LARGE , "Request Header Fields Too Large" ) ;
480
480
481
481
/// 451 Unavailable For Legal Reasons
482
- /// [[RFC7725](https://tools.ietf.org/html/rfc7725)]
482
+ /// [[RFC7725, Section 3 ](https://tools.ietf.org/html/rfc7725#section-3 )]
483
483
( 451 , UNAVAILABLE_FOR_LEGAL_REASONS , "Unavailable For Legal Reasons" ) ;
484
484
485
485
/// 500 Internal Server Error
486
- /// [[RFC7231 , Section 6 .6.1](https://tools .ietf.org/html/rfc7231 #section-6 .6.1)]
486
+ /// [[RFC9110 , Section 15 .6.1](https://datatracker .ietf.org/doc/ html/rfc9110 #section-15 .6.1)]
487
487
( 500 , INTERNAL_SERVER_ERROR , "Internal Server Error" ) ;
488
488
/// 501 Not Implemented
489
- /// [[RFC7231 , Section 6 .6.2](https://tools .ietf.org/html/rfc7231 #section-6 .6.2)]
489
+ /// [[RFC9110 , Section 15 .6.2](https://datatracker .ietf.org/doc/ html/rfc9110 #section-15 .6.2)]
490
490
( 501 , NOT_IMPLEMENTED , "Not Implemented" ) ;
491
491
/// 502 Bad Gateway
492
- /// [[RFC7231 , Section 6 .6.3](https://tools .ietf.org/html/rfc7231 #section-6 .6.3)]
492
+ /// [[RFC9110 , Section 15 .6.3](https://datatracker .ietf.org/doc/ html/rfc9110 #section-15 .6.3)]
493
493
( 502 , BAD_GATEWAY , "Bad Gateway" ) ;
494
494
/// 503 Service Unavailable
495
- /// [[RFC7231 , Section 6 .6.4](https://tools .ietf.org/html/rfc7231 #section-6 .6.4)]
495
+ /// [[RFC9110 , Section 15 .6.4](https://datatracker .ietf.org/doc/ html/rfc9110 #section-15 .6.4)]
496
496
( 503 , SERVICE_UNAVAILABLE , "Service Unavailable" ) ;
497
497
/// 504 Gateway Timeout
498
- /// [[RFC7231 , Section 6 .6.5](https://tools .ietf.org/html/rfc7231 #section-6 .6.5)]
498
+ /// [[RFC9110 , Section 15 .6.5](https://datatracker .ietf.org/doc/ html/rfc9110 #section-15 .6.5)]
499
499
( 504 , GATEWAY_TIMEOUT , "Gateway Timeout" ) ;
500
500
/// 505 HTTP Version Not Supported
501
- /// [[RFC7231 , Section 6 .6.6](https://tools .ietf.org/html/rfc7231 #section-6 .6.6)]
501
+ /// [[RFC9110 , Section 15 .6.6](https://datatracker .ietf.org/doc/ html/rfc9110 #section-15 .6.6)]
502
502
( 505 , HTTP_VERSION_NOT_SUPPORTED , "HTTP Version Not Supported" ) ;
503
503
/// 506 Variant Also Negotiates
504
- /// [[RFC2295](https://tools .ietf.org/html/rfc2295)]
504
+ /// [[RFC2295, Section 8.1 ](https://datatracker .ietf.org/doc/ html/rfc2295#section-8.1 )]
505
505
( 506 , VARIANT_ALSO_NEGOTIATES , "Variant Also Negotiates" ) ;
506
506
/// 507 Insufficient Storage
507
- /// [[RFC4918](https://tools .ietf.org/html/rfc4918)]
507
+ /// [[RFC4918, Section 11.5 ](https://datatracker .ietf.org/doc/ html/rfc4918#section-11.5 )]
508
508
( 507 , INSUFFICIENT_STORAGE , "Insufficient Storage" ) ;
509
509
/// 508 Loop Detected
510
- /// [[RFC5842](https://tools .ietf.org/html/rfc5842)]
510
+ /// [[RFC5842, Section 7.2 ](https://datatracker .ietf.org/doc/ html/rfc5842#section-7.2 )]
511
511
( 508 , LOOP_DETECTED , "Loop Detected" ) ;
512
512
513
513
/// 510 Not Extended
514
- /// [[RFC2774](https://tools .ietf.org/html/rfc2774)]
514
+ /// [[RFC2774, Section 7 ](https://datatracker .ietf.org/doc/ html/rfc2774#section-7 )]
515
515
( 510 , NOT_EXTENDED , "Not Extended" ) ;
516
516
/// 511 Network Authentication Required
517
- /// [[RFC6585](https://tools .ietf.org/html/rfc6585)]
517
+ /// [[RFC6585, Section 6 ](https://datatracker .ietf.org/doc/ html/rfc6585#section-6 )]
518
518
( 511 , NETWORK_AUTHENTICATION_REQUIRED , "Network Authentication Required" ) ;
519
519
}
520
520
0 commit comments