Repository navigation
Commit fb04ecc
Use urlsplit() instead of urlparse() in http.cookiejar.request_host()
request_host() only needs the netloc, which is the same for both, and
urlsplit() is cached while urlparse() is not. It is called once for
every stored domain on each CookieJar.add_cookie_header() call, which is
now about 2.5x faster.
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>1 parent 21a36aa commit fb04ecc
2 files changed
Lines changed: 4 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
627 | 627 | | |
628 | 628 | | |
629 | 629 | | |
630 | | - | |
| 630 | + | |
631 | 631 | | |
632 | 632 | | |
633 | 633 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
0 commit comments