8000 bpo-39780: Add http status code 103 by alimcmaster1 · Pull Request #18681 · python/cpython · GitHub
[go: up one dir, main page]

Skip to content

bpo-39780: Add http status code 103 #18681

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 2 commits into from
Closed
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Next Next commit
Add http status code 103 Early Hints
  • Loading branch information
alimcmaster1 committed Feb 28, 2020
commit 7153b804755cee2454e0e4221aaa6e70646a3ecb
4 changes: 4 additions & 0 deletions Doc/library/http.rst
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,7 @@ Code Enum Name Details
``100`` ``CONTINUE`` HTTP/1.1 :rfc:`7231`, Section 6.2.1
``101`` ``SWITCHING_PROTOCOLS`` HTTP/1.1 :rfc:`7231`, Section 6.2.2
``102`` ``PROCESSING`` WebDAV :rfc:`2518`, Section 10.1
``103`` ``EARLY_HINT`` An HTTP Status Code for Indicating Hints :rfc:`8297`
``200`` ``OK`` HTTP/1.1 :rfc:`7231`, Section 6.3.1
``201`` ``CREATED`` HTTP/1.1 :rfc:`7231`, Section 6.3.2
``202`` ``ACCEPTED`` HTTP/1.1 :rfc:`7231`, Section 6.3.3
Expand Down Expand Up @@ -130,3 +131,6 @@ equal to the constant name (i.e. ``http.HTTPStatus.OK`` is also available as

.. versionadded:: 3.8
Added ``451 UNAVAILABLE_FOR_LEGAL_REASONS`` status code.

.. versionchanged:: 3.9
Added ``103 Early Hints`` status code.
1 change: 1 addition & 0 deletions Lib/http/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ def __new__(cls, value, phrase, description=''):
SWITCHING_PROTOCOLS = (101, 'Switching Protocols',
'Switching to new protocol; obey Upgrade header')
PROCESSING = 102, 'Processing'
EARLY_HINTS = 103, 'Early Hints'

# success
OK = 200, 'OK', 'Request fulfilled, document follows'
Expand Down
1 change: 1 addition & 0 deletions Lib/test/test_httplib.py
Original file line number Diff line number Diff line change
Expand Up @@ -1388,6 +1388,7 @@ def test_client_constants(self):
'CONTINUE',
'SWITCHING_PROTOCOLS',
'PROCESSING',
'EARLY_HINTS',
'OK',
'CREATED',
'ACCEPTED',
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
Added a new status code to the http module: 103
EARLY_HINTS
0