Skip to content

[3.11] gh-100001: Also escape \s in http.server log messages. (GH-100038)#100040

Merged
miss-islington merged 1 commit intopython:3.11from
miss-islington:backport-7e29398-3.11
Dec 5, 2022
Merged

[3.11] gh-100001: Also escape \s in http.server log messages. (GH-100038)#100040
miss-islington merged 1 commit intopython:3.11from
miss-islington:backport-7e29398-3.11

Conversation

@miss-islington
Copy link
Contributor

@miss-islington miss-islington commented Dec 5, 2022

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.
(cherry picked from commit 7e29398)

Co-authored-by: Gregory P. Smith [email protected]

…H-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.
(cherry picked from commit 7e29398)

Co-authored-by: Gregory P. Smith <[email protected]>
@miss-islington miss-islington merged commit b2ff0f7 into python:3.11 Dec 5, 2022
@miss-islington miss-islington deleted the backport-7e29398-3.11 branch December 5, 2022 22:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants