Cookies.set()
should prepend a period to the domain
#2833
Replies: 2 comments
-
Could you give us an example... |
Beta Was this translation helpful? Give feedback.
0 replies
-
Sorry, upon further review, it looks like it's really an |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Since
httpx._models.Cookies
useshttp.cookiejar
,Cookies.set()
should check if the passed-in domain has a leading period, and if not, it should prepend a period. When there is no leading period for the cookie's domain, thencookiejar.CookieJar.clear()
cannot delete the cookie, and since prepending a period is not really intuitive,httpx._models.Cookies
should do that for the user.For those wondering, cookiejar.CookieJar.clear() just does a
del self._cookies[domain][path][name]
, so the domain has to match exactly, and this code that calls it is the thing that adds the period to the web response's cookie domain right before CookieJar.clear() is called.Beta Was this translation helpful? Give feedback.
All reactions