]> git.ipfire.org Git - thirdparty/Python/cpython.git/commit
gh-100519: simplification to `eff_request_host` in cookiejar.py (#99588)
authorGlyph <code@glyph.im>
Sun, 25 Dec 2022 00:14:51 +0000 (16:14 -0800)
committerGitHub <noreply@github.com>
Sun, 25 Dec 2022 00:14:51 +0000 (18:14 -0600)
commitb9aa14a484f653cb6a3a242776df9ac5fe161bfc
tree1f5f6da37fa38767e98112b050858afd566f2ef9
parent046cbc2080360b0b0bbe6ea7554045a6bbbd94bd
gh-100519: simplification to `eff_request_host` in cookiejar.py (#99588)

`IPV4_RE` includes a `.`, and the `.find(".") == -1` included here is already testing to make sure there's no dot, so this part of the expression is tautological. Instead use more modern `in` syntax to make it clear what the check is doing here. The simplified implementation more clearly matches the wording in RFC 2965.

Co-authored-by: hauntsaninja <hauntsaninja@gmail.com>
Lib/http/cookiejar.py
Misc/NEWS.d/next/Library/2022-12-24-16-39-53.gh-issue-100519.G_dZLP.rst [new file with mode: 0644]