Skip to content

Commit

Permalink
Fix issue: httpie#998
Browse files Browse the repository at this point in the history
  • Loading branch information
finik-dev-team committed Feb 5, 2021
1 parent cf78a12 commit 1d4c35f
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions httpie/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -109,6 +109,15 @@ def is_expired(expires: Optional[float]) -> bool:
for attrs in attr_sets
]

# HACK/FIXME: https://github.com/psf/requests/issues/5743
for cookie in cookies:
if 'expires' in cookie:
continue

max_age = cookie.get('max-age')
if max_age and max_age.isdigit():
cookie['expires'] = now + float(max_age)

return [
{
'name': cookie['name'],
Expand Down

0 comments on commit 1d4c35f

Please sign in to comment.