@@ -59,63 +59,63 @@ available in :class:`http.HTTPStatus` are:
59
59
======= =================================== ==================================================================
60
60
Code Enum Name Details
61
61
======= =================================== ==================================================================
62
- ``100 `` ``CONTINUE `` HTTP/1.1 :rfc: `7231 `, Section 6 .2.1
63
- ``101 `` ``SWITCHING_PROTOCOLS `` HTTP/1.1 :rfc: `7231 `, Section 6 .2.2
62
+ ``100 `` ``CONTINUE `` HTTP Semantics :rfc: `9110 `, Section 15 .2.1
63
+ ``101 `` ``SWITCHING_PROTOCOLS `` HTTP Semantics :rfc: `9110 `, Section 15 .2.2
64
64
``102 `` ``PROCESSING `` WebDAV :rfc: `2518 `, Section 10.1
65
65
``103 `` ``EARLY_HINTS `` An HTTP Status Code for Indicating Hints :rfc: `8297 `
66
- ``200 `` ``OK `` HTTP/1.1 :rfc: `7231 `, Section 6 .3.1
67
- ``201 `` ``CREATED `` HTTP/1.1 :rfc: `7231 `, Section 6 .3.2
68
- ``202 `` ``ACCEPTED `` HTTP/1.1 :rfc: `7231 `, Section 6 .3.3
69
- ``203 `` ``NON_AUTHORITATIVE_INFORMATION `` HTTP/1.1 :rfc: `7231 `, Section 6 .3.4
70
- ``204 `` ``NO_CONTENT `` HTTP/1.1 :rfc: `7231 `, Section 6 .3.5
71
- ``205 `` ``RESET_CONTENT `` HTTP/1.1 :rfc: `7231 `, Section 6 .3.6
72
- ``206 `` ``PARTIAL_CONTENT `` HTTP/1.1 :rfc: `7233 `, Section 4.1
66
+ ``200 `` ``OK `` HTTP Semantics :rfc: `9110 `, Section 15 .3.1
67
+ ``201 `` ``CREATED `` HTTP Semantics :rfc: `9110 `, Section 15 .3.2
68
+ ``202 `` ``ACCEPTED `` HTTP Semantics :rfc: `9110 `, Section 15 .3.3
69
+ ``203 `` ``NON_AUTHORITATIVE_INFORMATION `` HTTP Semantics :rfc: `9110 `, Section 15 .3.4
70
+ ``204 `` ``NO_CONTENT `` HTTP Semantics :rfc: `9110 `, Section 15 .3.5
71
+ ``205 `` ``RESET_CONTENT `` HTTP Semantics :rfc: `9110 `, Section 15 .3.6
72
+ ``206 `` ``PARTIAL_CONTENT `` HTTP Semantics :rfc: `9110 `, Section 15.3.7
73
73
``207 `` ``MULTI_STATUS `` WebDAV :rfc: `4918 `, Section 11.1
74
74
``208 `` ``ALREADY_REPORTED `` WebDAV Binding Extensions :rfc: `5842 `, Section 7.1 (Experimental)
75
75
``226 `` ``IM_USED `` Delta Encoding in HTTP :rfc: `3229 `, Section 10.4.1
76
- ``300 `` ``MULTIPLE_CHOICES `` HTTP/1.1 :rfc: `7231 `, Section 6 .4.1
77
- ``301 `` ``MOVED_PERMANENTLY `` HTTP/1.1 :rfc: `7231 `, Section 6 .4.2
78
- ``302 `` ``FOUND `` HTTP/1.1 :rfc: `7231 `, Section 6 .4.3
79
- ``303 `` ``SEE_OTHER `` HTTP/1.1 :rfc: `7231 `, Section 6 .4.4
80
- ``304 `` ``NOT_MODIFIED `` HTTP/1.1 :rfc: `7232 `, Section 4.1
81
- ``305 `` ``USE_PROXY `` HTTP/1.1 :rfc: `7231 `, Section 6 .4.5
82
- ``307 `` ``TEMPORARY_REDIRECT `` HTTP/1.1 :rfc: `7231 `, Section 6 .4.7
83
- ``308 `` ``PERMANENT_REDIRECT `` Permanent Redirect :rfc: `7238 `, Section 3 (Experimental)
84
- ``400 `` ``BAD_REQUEST `` HTTP/1.1 :rfc: `7231 `, Section 6 .5.1
85
- ``401 `` ``UNAUTHORIZED `` HTTP/1.1 Authentication :rfc: `7235 `, Section 3.1
86
- ``402 `` ``PAYMENT_REQUIRED `` HTTP/1.1 :rfc: `7231 `, Section 6 .5.2
87
- ``403 `` ``FORBIDDEN `` HTTP/1.1 :rfc: `7231 `, Section 6 .5.3
88
- ``404 `` ``NOT_FOUND `` HTTP/1.1 :rfc: `7231 `, Section 6 .5.4
89
- ``405 `` ``METHOD_NOT_ALLOWED `` HTTP/1.1 :rfc: `7231 `, Section 6 .5.5
90
- ``406 `` ``NOT_ACCEPTABLE `` HTTP/1.1 :rfc: `7231 `, Section 6 .5.6
91
- ``407 `` ``PROXY_AUTHENTICATION_REQUIRED `` HTTP/1.1 Authentication :rfc: `7235 `, Section 3.2
92
- ``408 `` ``REQUEST_TIMEOUT `` HTTP/1.1 :rfc: `7231 `, Section 6 .5.7
93
- ``409 `` ``CONFLICT `` HTTP/1.1 :rfc: `7231 `, Section 6 .5.8
94
- ``410 `` ``GONE `` HTTP/1.1 :rfc: `7231 `, Section 6 .5.9
95
- ``411 `` ``LENGTH_REQUIRED `` HTTP/1.1 :rfc: `7231 `, Section 6 .5.10
96
- ``412 `` ``PRECONDITION_FAILED `` HTTP/1.1 :rfc: `7232 `, Section 4.2
97
- ``413 `` ``REQUEST_ENTITY_TOO_LARGE `` HTTP/1.1 :rfc: `7231 `, Section 6 .5.11
98
- ``414 `` ``REQUEST_URI_TOO_LONG `` HTTP/1.1 :rfc: `7231 `, Section 6 .5.12
99
- ``415 `` ``UNSUPPORTED_MEDIA_TYPE `` HTTP/1.1 :rfc: `7231 `, Section 6 .5.13
100
- ``416 `` ``REQUESTED_RANGE_NOT_SATISFIABLE `` HTTP/1.1 Range Requests :rfc: `7233 `, Section 4.4
101
- ``417 `` ``EXPECTATION_FAILED `` HTTP/1.1 :rfc: `7231 `, Section 6 .5.14
76
+ ``300 `` ``MULTIPLE_CHOICES `` HTTP Semantics :rfc: `9110 `, Section 15 .4.1
77
+ ``301 `` ``MOVED_PERMANENTLY `` HTTP Semantics :rfc: `9110 `, Section 15 .4.2
78
+ ``302 `` ``FOUND `` HTTP Semantics :rfc: `9110 `, Section 15 .4.3
79
+ ``303 `` ``SEE_OTHER `` HTTP Semantics :rfc: `9110 `, Section 15 .4.4
80
+ ``304 `` ``NOT_MODIFIED `` HTTP Semantics :rfc: `9110 `, Section 15.4.5
81
+ ``305 `` ``USE_PROXY `` HTTP Semantics :rfc: `9110 `, Section 15 .4.6
82
+ ``307 `` ``TEMPORARY_REDIRECT `` HTTP Semantics :rfc: `9110 `, Section 15 .4.8
83
+ ``308 `` ``PERMANENT_REDIRECT `` HTTP Semantics :rfc: `9110 `, Section 15.4.9
84
+ ``400 `` ``BAD_REQUEST `` HTTP Semantics :rfc: `9110 `, Section 15 .5.1
85
+ ``401 `` ``UNAUTHORIZED `` HTTP Semantics :rfc: `9110 `, Section 15.5.2
86
+ ``402 `` ``PAYMENT_REQUIRED `` HTTP Semantics :rfc: `9110 `, Section 15 .5.3
87
+ ``403 `` ``FORBIDDEN `` HTTP Semantics :rfc: `9110 `, Section 15 .5.4
88
+ ``404 `` ``NOT_FOUND `` HTTP Semantics :rfc: `9110 `, Section 15 .5.5
89
+ ``405 `` ``METHOD_NOT_ALLOWED `` HTTP Semantics :rfc: `9110 `, Section 15 .5.6
90
+ ``406 `` ``NOT_ACCEPTABLE `` HTTP Semantics :rfc: `9110 `, Section 15 .5.7
91
+ ``407 `` ``PROXY_AUTHENTICATION_REQUIRED `` HTTP Semantics :rfc: `9110 `, Section 15.5.8
92
+ ``408 `` ``REQUEST_TIMEOUT `` HTTP Semantics :rfc: `9110 `, Section 15 .5.9
93
+ ``409 `` ``CONFLICT `` HTTP Semantics :rfc: `9110 `, Section 15 .5.10
94
+ ``410 `` ``GONE `` HTTP Semantics :rfc: `9110 `, Section 15 .5.11
95
+ ``411 `` ``LENGTH_REQUIRED `` HTTP Semantics :rfc: `9110 `, Section 15 .5.12
96
+ ``412 `` ``PRECONDITION_FAILED `` HTTP Semantics :rfc: `9110 `, Section 15.5.13
97
+ ``413 `` ``CONTENT_TOO_LARGE `` HTTP Semantics :rfc: `9110 `, Section 15 .5.14
98
+ ``414 `` ``URI_TOO_LONG `` HTTP Semantics :rfc: `9110 `, Section 15 .5.15
99
+ ``415 `` ``UNSUPPORTED_MEDIA_TYPE `` HTTP Semantics :rfc: `9110 `, Section 15 .5.16
100
+ ``416 `` ``RANGE_NOT_SATISFIABLE `` HTTP Semantics :rfc: `9110 `, Section 15.5.17
101
+ ``417 `` ``EXPECTATION_FAILED `` HTTP Semantics :rfc: `9110 `, Section 15 .5.18
102
102
``418 `` ``IM_A_TEAPOT `` HTCPCP/1.0 :rfc: `2324 `, Section 2.3.2
103
- ``421 `` ``MISDIRECTED_REQUEST `` HTTP/2 :rfc: `7540 `, Section 9.1.2
104
- ``422 `` ``UNPROCESSABLE_ENTITY `` WebDAV :rfc: `4918 `, Section 11.2
103
+ ``421 `` ``MISDIRECTED_REQUEST `` HTTP Semantics :rfc: `9110 `, Section 15.5.20
104
+ ``422 `` ``UNPROCESSABLE_CONTENT `` HTTP Semantics :rfc: `9110 `, Section 15.5.21
105
105
``423 `` ``LOCKED `` WebDAV :rfc: `4918 `, Section 11.3
106
106
``424 `` ``FAILED_DEPENDENCY `` WebDAV :rfc: `4918 `, Section 11.4
107
107
``425 `` ``TOO_EARLY `` Using Early Data in HTTP :rfc: `8470 `
108
- ``426 `` ``UPGRADE_REQUIRED `` HTTP/1.1 :rfc: `7231 `, Section 6 .5.15
108
+ ``426 `` ``UPGRADE_REQUIRED `` HTTP Semantics :rfc: `9110 `, Section 15 .5.22
109
109
``428 `` ``PRECONDITION_REQUIRED `` Additional HTTP Status Codes :rfc: `6585 `
110
110
``429 `` ``TOO_MANY_REQUESTS `` Additional HTTP Status Codes :rfc: `6585 `
111
111
``431 `` ``REQUEST_HEADER_FIELDS_TOO_LARGE `` Additional HTTP Status Codes :rfc: `6585 `
112
112
``451 `` ``UNAVAILABLE_FOR_LEGAL_REASONS `` An HTTP Status Code to Report Legal Obstacles :rfc: `7725 `
113
- ``500 `` ``INTERNAL_SERVER_ERROR `` HTTP/1.1 :rfc: `7231 `, Section 6 .6.1
114
- ``501 `` ``NOT_IMPLEMENTED `` HTTP/1.1 :rfc: `7231 `, Section 6 .6.2
115
- ``502 `` ``BAD_GATEWAY `` HTTP/1.1 :rfc: `7231 `, Section 6 .6.3
116
- ``503 `` ``SERVICE_UNAVAILABLE `` HTTP/1.1 :rfc: `7231 `, Section 6 .6.4
117
- ``504 `` ``GATEWAY_TIMEOUT `` HTTP/1.1 :rfc: `7231 `, Section 6 .6.5
118
- ``505 `` ``HTTP_VERSION_NOT_SUPPORTED `` HTTP/1.1 :rfc: `7231 `, Section 6 .6.6
113
+ ``500 `` ``INTERNAL_SERVER_ERROR `` HTTP Semantics :rfc: `9110 `, Section 15 .6.1
114
+ ``501 `` ``NOT_IMPLEMENTED `` HTTP Semantics :rfc: `9110 `, Section 15 .6.2
115
+ ``502 `` ``BAD_GATEWAY `` HTTP Semantics :rfc: `9110 `, Section 15 .6.3
116
+ ``503 `` ``SERVICE_UNAVAILABLE `` HTTP Semantics :rfc: `9110 `, Section 15 .6.4
117
+ ``504 `` ``GATEWAY_TIMEOUT `` HTTP Semantics :rfc: `9110 `, Section 15 .6.5
118
+ ``505 `` ``HTTP_VERSION_NOT_SUPPORTED `` HTTP Semantics :rfc: `9110 `, Section 15 .6.6
119
119
``506 `` ``VARIANT_ALSO_NEGOTIATES `` Transparent Content Negotiation in HTTP :rfc: `2295 `, Section 8.1 (Experimental)
120
120
``507 `` ``INSUFFICIENT_STORAGE `` WebDAV :rfc: `4918 `, Section 11.5
121
121
``508 `` ``LOOP_DETECTED `` WebDAV Binding Extensions :rfc: `5842 `, Section 7.2 (Experimental)
@@ -137,22 +137,26 @@ equal to the constant name (i.e. ``http.HTTPStatus.OK`` is also available as
137
137
.. versionadded :: 3.9
138
138
Added ``103 EARLY_HINTS ``, ``418 IM_A_TEAPOT `` and ``425 TOO_EARLY `` status codes.
139
139
140
+ .. versionchanged :: 3.13
141
+ Implemented RFC9110 naming for status constants. Old constant names are preserved for
142
+ backwards compatibility.
143
+
140
144
HTTP status category
141
145
--------------------
142
146
143
147
.. versionadded :: 3.12
144
148
145
149
The enum values have several properties to indicate the HTTP status category:
146
150
147
- ==================== ======================== ===============================
151
+ ==================== ======================== ======================================
148
152
Property Indicates that Details
149
- ==================== ======================== ===============================
150
- ``is_informational `` ``100 <= status <= 199 `` HTTP/1.1 :rfc: `7231 `, Section 6
151
- ``is_success `` ``200 <= status <= 299 `` HTTP/1.1 :rfc: `7231 `, Section 6
152
- ``is_redirection `` ``300 <= status <= 399 `` HTTP/1.1 :rfc: `7231 `, Section 6
153
- ``is_client_error `` ``400 <= status <= 499 `` HTTP/1.1 :rfc: `7231 `, Section 6
154
- ``is_server_error `` ``500 <= status <= 599 `` HTTP/1.1 :rfc: `7231 `, Section 6
155
- ==================== ======================== ===============================
153
+ ==================== ======================== ======================================
154
+ ``is_informational `` ``100 <= status <= 199 `` HTTP Semantics :rfc: `9110 `, Section 15
155
+ ``is_success `` ``200 <= status <= 299 `` HTTP Semantics :rfc: `9110 `, Section 15
156
+ ``is_redirection `` ``300 <= status <= 399 `` HTTP Semantics :rfc: `9110 `, Section 15
157
+ ``is_client_error `` ``400 <= status <= 499 `` HTTP Semantics :rfc: `9110 `, Section 15
158
+ ``is_server_error `` ``500 <= status <= 599 `` HTTP Semantics :rfc: `9110 `, Section 15
159
+ ==================== ======================== ======================================
156
160
157
161
Usage::
158
162
@@ -203,13 +207,13 @@ available in :class:`http.HTTPMethod` are:
203
207
=========== =================================== ==================================================================
204
208
Method Enum Name Details
205
209
=========== =================================== ==================================================================
206
- ``GET `` ``GET `` HTTP/1.1 :rfc: `7231 `, Section 4 .3.1
207
- ``HEAD `` ``HEAD `` HTTP/1.1 :rfc: `7231 `, Section 4 .3.2
208
- ``POST `` ``POST `` HTTP/1.1 :rfc: `7231 `, Section 4 .3.3
209
- ``PUT `` ``PUT `` HTTP/1.1 :rfc: `7231 `, Section 4 .3.4
210
- ``DELETE `` ``DELETE `` HTTP/1.1 :rfc: `7231 `, Section 4 .3.5
211
- ``CONNECT `` ``CONNECT `` HTTP/1.1 :rfc: `7231 `, Section 4 .3.6
212
- ``OPTIONS `` ``OPTIONS `` HTTP/1.1 :rfc: `7231 `, Section 4 .3.7
213
- ``TRACE `` ``TRACE `` HTTP/1.1 :rfc: `7231 `, Section 4 .3.8
210
+ ``GET `` ``GET `` HTTP Semantics :rfc: `9110 `, Section 9 .3.1
211
+ ``HEAD `` ``HEAD `` HTTP Semantics :rfc: `9110 `, Section 9 .3.2
212
+ ``POST `` ``POST `` HTTP Semantics :rfc: `9110 `, Section 9 .3.3
213
+ ``PUT `` ``PUT `` HTTP Semantics :rfc: `9110 `, Section 9 .3.4
214
+ ``DELETE `` ``DELETE `` HTTP Semantics :rfc: `9110 `, Section 9 .3.5
215
+ ``CONNECT `` ``CONNECT `` HTTP Semantics :rfc: `9110 `, Section 9 .3.6
216
+ ``OPTIONS `` ``OPTIONS `` HTTP Semantics :rfc: `9110 `, Section 9 .3.7
217
+ ``TRACE `` ``TRACE `` HTTP Semantics :rfc: `9110 `, Section 9 .3.8
214
218
``PATCH `` ``PATCH `` HTTP/1.1 :rfc: `5789 `
215
219
=========== =================================== ==================================================================
0 commit comments