classification
Title: http.server's send_error could set the content-length of the error body
Type: enhancement Stage: resolved
Components: Library (Lib) Versions: Python 3.4
process
Status: closed Resolution: fixed
Dependencies: Superseder:
Assigned To: Nosy List: jcea, orsenthil, pitrou, python-dev
Priority: low Keywords: patch

Created on 2012-09-29 23:02 by pitrou, last changed 2012-10-11 06:19 by orsenthil. This issue is now closed.

Files
File name Uploaded Description Edit
http_error_content_length.patch pitrou, 2012-09-29 23:05 review
Messages (6)
msg171597 - (view) Author: Antoine Pitrou (pitrou) * (Python committer) Date: 2012-09-29 23:02
BaseHTTPRequestHandler.send_error() sets "connection: close", so the client shouldn't need a content-length, but it can still be nicer to send it (e.g. it seems to solve an issue with wget, see issue15991).
msg171598 - (view) Author: Antoine Pitrou (pitrou) * (Python committer) Date: 2012-09-29 23:05
Here is a patch.
msg172520 - (view) Author: Senthil Kumaran (orsenthil) * (Python committer) Date: 2012-10-09 20:35
+1 to this change. It may be helpful in the cases like issue15991.
msg172612 - (view) Author: Jesús Cea Avión (jcea) * (Python committer) Date: 2012-10-11 01:08
Looks good.
msg172622 - (view) Author: Roundup Robot (python-dev) Date: 2012-10-11 06:16
New changeset ee34cb049a10 by Senthil Kumaran in branch 'default':
Issue #16088: BaseHTTPRequestHandler's send_error method includes a
http://hg.python.org/cpython/rev/ee34cb049a10
msg172623 - (view) Author: Senthil Kumaran (orsenthil) * (Python committer) Date: 2012-10-11 06:19
I took the privilege of testing, adding news and docs and committing it.

Thank you!
History
Date User Action Args
2012-10-11 06:19:07orsenthilsetstatus: open -> closed
resolution: fixed
messages: + msg172623

stage: resolved
2012-10-11 06:16:42python-devsetnosy: + python-dev
messages: + msg172622
2012-10-11 01:08:27jceasetnosy: + jcea
messages: + msg172612
2012-10-09 20:35:02orsenthilsetmessages: + msg172520
2012-09-29 23:05:08pitrousetfiles: + http_error_content_length.patch
keywords: + patch
messages: + msg171598
2012-09-29 23:02:31pitroucreate