Skip to content

Commit 9a81fa4

Browse files
committed
Fix-#7003: RequestsCookieJar cannot correctly retrieve zero value
1 parent 4b9c546 commit 9a81fa4

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/requests/cookies.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -408,7 +408,7 @@ def _find_no_duplicates(self, name, domain=None, path=None):
408408
# we will eventually return this as long as no cookie conflict
409409
toReturn = cookie.value
410410

411-
if toReturn:
411+
if toReturn is not None:
412412
return toReturn
413413
raise KeyError(f"name={name!r}, domain={domain!r}, path={path!r}")
414414

0 commit comments

Comments
 (0)