Skip to content

Commit

Permalink
Fixed #255 -- Added missing HTTP status codes.
Browse files Browse the repository at this point in the history
  • Loading branch information
felixxm committed Jan 1, 2023
1 parent 7daf43a commit 7028719
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 0 deletions.
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,9 @@

### Enhancements

* Adds support for missing HTTP status codes: 103, 208, 226, 308, 428, 429,
431, 451, and 511.

* Confirms support for Python 3.11.

* Confirms support for Django 4.1.
Expand Down
9 changes: 9 additions & 0 deletions request/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
(100, _('Continue')),
(101, _('Switching Protocols')),
(102, _('Processing (WebDAV)')),
(103, _('Early Hints')),

# Success
(200, _('OK')),
Expand All @@ -21,6 +22,8 @@
(205, _('Reset Content')),
(206, _('Partial Content')),
(207, _('Multi-Status (WebDAV)')),
(208, _('Already Reported (WebDAV)')),
(226, _('IM Used (HTTP Delta encoding)')),

# Redirection
(300, _('Multiple Choices')),
Expand All @@ -31,6 +34,7 @@
(305, _('Use Proxy')),
(306, _('Switch Proxy')), # No longer used
(307, _('Temporary Redirect')),
(308, _('Permanent Redirect')),

# Client Error
(400, _('Bad Request')),
Expand All @@ -57,7 +61,11 @@
(424, _('Failed Dependency (WebDAV)')),
(425, _('Unordered Collection')),
(426, _('Upgrade Required')),
(428, _('Precondition Required')),
(429, _('Too Many Requests')),
(431, _('Request Header Fields Too Large')),
(449, _('Retry With')),
(451, _('Unavailable For Legal Reasons')),

# Server Error
(500, _('Internal Server Error')),
Expand All @@ -70,6 +78,7 @@
(507, _('Insufficient Storage (WebDAV)')),
(509, _('Bandwidth Limit Exceeded')),
(510, _('Not Extended')),
(511, _('Network Authentication Required')),
)


Expand Down

0 comments on commit 7028719

Please sign in to comment.