]> git.ipfire.org Git - thirdparty/Python/cpython.git/commit
gh-100001: Also escape \s in http.server log messages. (#100038)
authorGregory P. Smith <greg@krypto.org>
Mon, 5 Dec 2022 22:27:55 +0000 (14:27 -0800)
committerGitHub <noreply@github.com>
Mon, 5 Dec 2022 22:27:55 +0000 (14:27 -0800)
commit7e29398407dbd53b714702abb89aa2fd7baca48a
tree58e6a710bc11ed6acce0fa8b777110818cf9be42
parente9e63ad8653296c199446d6f7cdad889e492a34e
gh-100001: Also escape \s in http.server log messages. (#100038)

Also \ escape \s in the http.server BaseHTTPRequestHandler.log_message so
that it is technically possible to parse the line and reconstruct what the
original data was.  Without this a \xHH is ambiguious as to if it is a hex
replacement we put in or the characters r"\x" came through in the original
request line.
Lib/http/server.py
Lib/test/test_httpservers.py
Misc/NEWS.d/next/Library/2022-12-05-13-40-15.gh-issue-100001.78ReYp.rst [new file with mode: 0644]