Skip to content

Commit 7028719

Browse files
committed
Fixed #255 -- Added missing HTTP status codes.
1 parent 7daf43a commit 7028719

File tree

2 files changed

+12
-0
lines changed

2 files changed

+12
-0
lines changed

CHANGELOG.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,9 @@
44

55
### Enhancements
66

7+
* Adds support for missing HTTP status codes: 103, 208, 226, 308, 428, 429,
8+
431, 451, and 511.
9+
710
* Confirms support for Python 3.11.
811

912
* Confirms support for Django 4.1.

request/utils.py

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@
1111
(100, _('Continue')),
1212
(101, _('Switching Protocols')),
1313
(102, _('Processing (WebDAV)')),
14+
(103, _('Early Hints')),
1415

1516
# Success
1617
(200, _('OK')),
@@ -21,6 +22,8 @@
2122
(205, _('Reset Content')),
2223
(206, _('Partial Content')),
2324
(207, _('Multi-Status (WebDAV)')),
25+
(208, _('Already Reported (WebDAV)')),
26+
(226, _('IM Used (HTTP Delta encoding)')),
2427

2528
# Redirection
2629
(300, _('Multiple Choices')),
@@ -31,6 +34,7 @@
3134
(305, _('Use Proxy')),
3235
(306, _('Switch Proxy')), # No longer used
3336
(307, _('Temporary Redirect')),
37+
(308, _('Permanent Redirect')),
3438

3539
# Client Error
3640
(400, _('Bad Request')),
@@ -57,7 +61,11 @@
5761
(424, _('Failed Dependency (WebDAV)')),
5862
(425, _('Unordered Collection')),
5963
(426, _('Upgrade Required')),
64+
(428, _('Precondition Required')),
65+
(429, _('Too Many Requests')),
66+
(431, _('Request Header Fields Too Large')),
6067
(449, _('Retry With')),
68+
(451, _('Unavailable For Legal Reasons')),
6169

6270
# Server Error
6371
(500, _('Internal Server Error')),
@@ -70,6 +78,7 @@
7078
(507, _('Insufficient Storage (WebDAV)')),
7179
(509, _('Bandwidth Limit Exceeded')),
7280
(510, _('Not Extended')),
81+
(511, _('Network Authentication Required')),
7382
)
7483

7584

0 commit comments

Comments
 (0)