Skip to content

Commit e430706

Browse files
authored
Add missing status codes (#1096)
1 parent 029882e commit e430706

File tree

1 file changed

+12
-5
lines changed

1 file changed

+12
-5
lines changed

starlette/status.py

+12-5
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,14 @@
11
"""
22
HTTP codes
3-
See RFC 2616 - https://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html
4-
And RFC 6585 - https://tools.ietf.org/html/rfc6585
5-
And RFC 4918 - https://tools.ietf.org/html/rfc4918
6-
And RFC 8470 - https://tools.ietf.org/html/rfc8470
3+
See HTTP Status Code Registry:
4+
https://www.iana.org/assignments/http-status-codes/http-status-codes.xhtml
5+
76
And RFC 2324 - https://tools.ietf.org/html/rfc2324
8-
And RFC 5842 - https://tools.ietf.org/html/rfc5842
97
"""
108
HTTP_100_CONTINUE = 100
119
HTTP_101_SWITCHING_PROTOCOLS = 101
10+
HTTP_102_PROCESSING = 102
11+
HTTP_103_EARLY_HINTS = 103
1212
HTTP_200_OK = 200
1313
HTTP_201_CREATED = 201
1414
HTTP_202_ACCEPTED = 202
@@ -18,6 +18,7 @@
1818
HTTP_206_PARTIAL_CONTENT = 206
1919
HTTP_207_MULTI_STATUS = 207
2020
HTTP_208_ALREADY_REPORTED = 208
21+
HTTP_226_IM_USED = 226
2122
HTTP_300_MULTIPLE_CHOICES = 300
2223
HTTP_301_MOVED_PERMANENTLY = 301
2324
HTTP_302_FOUND = 302
@@ -26,6 +27,7 @@
2627
HTTP_305_USE_PROXY = 305
2728
HTTP_306_RESERVED = 306
2829
HTTP_307_TEMPORARY_REDIRECT = 307
30+
HTTP_308_PERMANENT_REDIRECT = 308
2931
HTTP_400_BAD_REQUEST = 400
3032
HTTP_401_UNAUTHORIZED = 401
3133
HTTP_402_PAYMENT_REQUIRED = 402
@@ -45,10 +47,12 @@
4547
HTTP_416_REQUESTED_RANGE_NOT_SATISFIABLE = 416
4648
HTTP_417_EXPECTATION_FAILED = 417
4749
HTTP_418_IM_A_TEAPOT = 418
50+
HTTP_421_MISDIRECTED_REQUEST = 421
4851
HTTP_422_UNPROCESSABLE_ENTITY = 422
4952
HTTP_423_LOCKED = 423
5053
HTTP_424_FAILED_DEPENDENCY = 424
5154
HTTP_425_TOO_EARLY = 425
55+
HTTP_426_UPGRADE_REQUIRED = 426
5256
HTTP_428_PRECONDITION_REQUIRED = 428
5357
HTTP_429_TOO_MANY_REQUESTS = 429
5458
HTTP_431_REQUEST_HEADER_FIELDS_TOO_LARGE = 431
@@ -59,7 +63,10 @@
5963
HTTP_503_SERVICE_UNAVAILABLE = 503
6064
HTTP_504_GATEWAY_TIMEOUT = 504
6165
HTTP_505_HTTP_VERSION_NOT_SUPPORTED = 505
66+
HTTP_506_VARIANT_ALSO_NEGOTIATES = 506
6267
HTTP_507_INSUFFICIENT_STORAGE = 507
68+
HTTP_508_LOOP_DETECTED = 508
69+
HTTP_510_NOT_EXTENDED = 510
6370
HTTP_511_NETWORK_AUTHENTICATION_REQUIRED = 511
6471

6572

0 commit comments

Comments
 (0)