classification
Title: Add HTTP status codes introduced by RFC 6585
Type: enhancement Stage: resolved
Components: Library (Lib) Versions: Python 3.3
process
Status: closed Resolution: fixed
Dependencies: Superseder:
Assigned To: Nosy List: EungJun.Yi, hynek, orsenthil, python-dev
Priority: normal Keywords: patch

Created on 2012-05-14 18:01 by EungJun.Yi, last changed 2012-05-16 09:38 by hynek. This issue is now closed.

Files
File name Uploaded Description Edit
rfc6585.patch EungJun.Yi, 2012-05-14 18:01 review
rfc6585-rev2.patch EungJun.Yi, 2012-05-15 14:46 review
Messages (6)
msg160651 - (view) Author: EungJun Yi (EungJun.Yi) * Date: 2012-05-14 18:01
This patch add HTTP status codes introduced by RFC 6585, to http.client and http.server.

428 Precondition Required
429 Too Many Requests
431 Request Header Fields Too Large
511 Network Authentication Required
msg160652 - (view) Author: Hynek Schlawack (hynek) * (Python committer) Date: 2012-05-14 18:16
I've cross-checked the patch against the RFC and it LGTM. Tests still pass as expected.
msg160717 - (view) Author: Hynek Schlawack (hynek) * (Python committer) Date: 2012-05-15 11:48
EungYun,

After further research I've found two issue which you should fix before it can be checked in:

 - The multi-line strings are missing spaces at their line break (429 and 431).
 - The error codes are documented at http://hg.python.org/cpython/file/26b8ec8a7800/Doc/library/http.client.rst#l180 , so you should add the new ones there.
 - You should mention the new RFC at Lib/http/server.py#l576 .

Would you like to update your patch?
msg160732 - (view) Author: EungJun Yi (EungJun.Yi) * Date: 2012-05-15 14:51
Hynek, I have fixed them and upload the patch, rfc6585-rev2.patch.
msg160816 - (view) Author: Roundup Robot (python-dev) Date: 2012-05-16 09:24
New changeset 981aabe6ea2f by Hynek Schlawack in branch 'default':
#14809: Add HTTP status codes from RFC 6585 to http.server and http.client
http://hg.python.org/cpython/rev/981aabe6ea2f
msg160820 - (view) Author: Hynek Schlawack (hynek) * (Python committer) Date: 2012-05-16 09:38
Thank you for your contribution to Python, EungJun!

Just two small remarks:

 - Please sign and submit the contributor form from http://www.python.org/psf/contrib/ . You'll get a nice star next to your name in return. :)
 - I have fixed the flow of one of the lines. It's no big deal, but pep8 asks for a max line length of 79 characters.
History
Date User Action Args
2012-05-16 09:38:42hyneksetstatus: open -> closed
resolution: fixed
messages: + msg160820

stage: needs patch -> resolved
2012-05-16 09:24:29python-devsetnosy: + python-dev
messages: + msg160816
2012-05-15 15:12:10orsenthilsetnosy: + orsenthil
2012-05-15 14:51:37EungJun.Yisetmessages: + msg160732
2012-05-15 14:46:03EungJun.Yisetfiles: + rfc6585-rev2.patch
2012-05-15 11:48:41hyneksetmessages: + msg160717
stage: patch review -> needs patch
2012-05-14 18:16:13hyneksetnosy: + hynek

messages: + msg160652
stage: patch review
2012-05-14 18:01:11EungJun.Yicreate