]> git.ipfire.org Git - thirdparty/Python/cpython.git/commit
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 21:39:22 +0000 (13:39 -0800)
committerGitHub <noreply@github.com>
Mon, 5 Dec 2022 21:39:22 +0000 (13:39 -0800)
commita726f747e659efed674db1ebf57218c20d8c0c39
tree772cdbde80f74e5a42d36eb476100dab5bcbce25
parentf3a58cece6c7346355397a3e7848b0df38a0e20d
gh-100001: Omit control characters in http.server stderr logs. (GH-100002)

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]