Skip to content
Myr

Add rfc9110 HTTP status code names

Before adoption: this commit came in with the history the project adopted, so no landing records it.

RFC 9110 _HTTP Semantics_ obsoletes some earlier RFCs which defined HTTP 1.1. It adds some status codes that were previously only used for WebDAV to HTTP _proper_ after making the names somewhat more generic. See https://www.rfc-editor.org/rfc/rfc9110.html#name-changes-from-rfc-7231 This commit adds the http status code names from that RFC.

authored by Michiel W. Beijen · committed by Michiel W. Beijen · parent 2a438c2 · Browse files · 1 file+4 added−4 removed
This commit

State

Before adoption: this commit came in with the history the project adopted, so no landing records it.

Diff stats

1 file+4 added−4 removed

  • other:+4 added−4 removed

1 file+4 added−4 removed

modified:src/requests/status_codes.py+4 added-4 removed
22 unmodified lines
23_codes = {24 # Informational.25 100: ("continue",),26 101: ("switching_protocols",),27 102: ("processing",),27 102: ("processing", "early-hints"),28 103: ("checkpoint",),29 122: ("uri_too_long", "request_uri_too_long"),30 200: ("ok", "okay", "all_ok", "all_okay", "all_good", "\\o/", "✓"),31 201: ("created",),
32 unmodified lines
64 409: ("conflict",),65 410: ("gone",),66 411: ("length_required",),67 412: ("precondition_failed", "precondition"),68 413: ("request_entity_too_large",),69 414: ("request_uri_too_large",),68 413: ("request_entity_too_large", "content_too_large"),69 414: ("request_uri_too_large", "uri_too_long"),70 415: ("unsupported_media_type", "unsupported_media", "media_type"),71 416: (72 "requested_range_not_satisfiable",73 "requested_range",
1 unmodified line
75 ),76 417: ("expectation_failed",),77 418: ("im_a_teapot", "teapot", "i_am_a_teapot"),78 421: ("misdirected_request",),79 422: ("unprocessable_entity", "unprocessable"),79 422: ("unprocessable_entity", "unprocessable", "unprocessable_content"),80 423: ("locked",),81 424: ("failed_dependency", "dependency"),82 425: ("unordered_collection", "unordered", "too_early"),83 426: ("upgrade_required", "upgrade"),
45 unmodified lines