Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion Lib/http/cookiejar.py
Original file line number Diff line number Diff line change
Expand Up @@ -627,7 +627,7 @@ def request_host(request):

"""
url = request.get_full_url()
host = urllib.parse.urlparse(url).netloc
host = urllib.parse.urlsplit(url).netloc
if host == "":
host = request.get_header("Host", "")

Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
Speed up :meth:`http.cookiejar.CookieJar.add_cookie_header` by about 2.5x by
parsing the request URL with :func:`urllib.parse.urlsplit` instead of
:func:`urllib.parse.urlparse` when checking each stored domain.
Loading