[New-bugs-announce] [issue27414] http.server.BaseHTTPRequestHandler inconsistence with Content-Length value

Mathieu Xhonneux report at bugs.python.org
Wed Jun 29 09:34:36 EDT 2016


New submission from Mathieu Xhonneux:

With Python 3.5, when I subclass SimpleHTTPRequestHandler, which itself subclasses BaseHTTPRequestHandler, and I try to access a non-existing file, the server responds with a 404 code, but send_error (see Lib/http/server.py, line 473) adds the Content-Length header with an int value, whereas all others functions convert this value to str (see lines 699, 761).

For consistency, all header values should be str.

----------
components: Library (Lib)
messages: 269488
nosy: m.xhonneux
priority: normal
severity: normal
status: open
title: http.server.BaseHTTPRequestHandler inconsistence with Content-Length value
type: enhancement
versions: Python 3.5

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue27414>
_______________________________________


More information about the New-bugs-announce mailing list