]> git.ipfire.org Git - thirdparty/Python/cpython.git/commit
[3.7] gh-100001: Omit control characters in http.server stderr logs. (GH-100002)...
authorMiss Islington (bot) <31488909+miss-islington@users.noreply.github.com>
Mon, 5 Dec 2022 23:10:10 +0000 (15:10 -0800)
committerGitHub <noreply@github.com>
Mon, 5 Dec 2022 23:10:10 +0000 (18:10 -0500)
commitb5bdf6a90d0c2a9c12b671340f7776e233ef625a
treec75ae02327e0dbdf282e2f6cb3ebb2755d712662
parentb0b590be9597fd5919228d251812dd54145f70a7
[3.7] gh-100001: Omit control characters in http.server stderr logs. (GH-100002) (GH-100034)

Replace control characters in http.server.BaseHTTPRequestHandler.log_message with an escaped \xHH sequence to avoid causing problems for the terminal the output is printed to.
(cherry picked from commit d8ab0a4dfa48f881b4ac9ab857d2e9de42f72828)

Co-authored-by: Gregory P. Smith <greg@krypto.org>
Doc/library/http.server.rst
Lib/http/server.py
Lib/test/test_httpservers.py
Misc/NEWS.d/next/Security/2022-12-05-01-39-10.gh-issue-100001.uD05Fc.rst [new file with mode: 0644]