Skip to content

Commit

Permalink
bugfix: use subdomains field as domain_specified
Browse files Browse the repository at this point in the history
  • Loading branch information
perklet committed Jul 13, 2024
1 parent 630a4dc commit e40decc
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions curl_cffi/requests/cookies.py
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ def from_cookiejar_cookie(cls, cookie: Cookie):
name=cookie.name,
value=cookie.value or "",
hostname=cookie.domain,
subdomains=cookie.domain_initial_dot,
subdomains=cookie.domain_specified,
path=cookie.path,
secure=cookie.secure,
expires=int(cookie.expires or 0),
Expand All @@ -105,7 +105,7 @@ def to_cookiejar_cookie(self) -> Cookie:
port=None,
port_specified=False,
domain=self.hostname,
domain_specified=True,
domain_specified=self.subdomains,
domain_initial_dot=bool(self.hostname.startswith(".")),
path=self.path,
path_specified=bool(self.path),
Expand Down

0 comments on commit e40decc

Please sign in to comment.