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

STINNER Victor report at bugs.python.org
Tue Nov 22 03:31:36 EST 2016


STINNER Victor added the comment:

Mathieu: "For consistency, all header values should be str."

Xiang: issue27414_v2.patch: Doc/library/http.server.rst
"*keyword* and *value* should both be :class:`str`."

I'm sorry, but I don't understand the whole point of this issue. The current code works, I don't see any good reason to change it.

The unit test is a little bit complex for a little tiny implementation detail. Usually, we try to avoid unit tests on implementation details in the Python test suite.

It's perfectly fine to pass an integer to an HTTP value, it's just super convenient.

I checked the HTTP client: the type of the 'argument' parameter of putheader() is not documented neither, so I think that it's just fine to leave the doc unchanged.

I close now this issue NOTABUG.

----------
resolution:  -> not a bug
status: open -> closed

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


More information about the Python-bugs-list mailing list