Skip to content
Myr

max-age may be not digits

Before adoption: this commit came in with the history the project adopted, so no landing records it.

authored by latyas(懒) · committed by latyas(懒) · parent cda95d3 · Browse files · 1 file+4 added−1 removed
This commit

State

Before adoption: this commit came in with the history the project adopted, so no landing records it.

Diff stats

1 file+4 added−1 removed

  • other:+4 added−1 removed

1 file+4 added−1 removed

modified:requests/cookies.py+4 added-1 removed
413 unmodified lines
414 """Convert a Morsel object into a Cookie containing the one k/v pair."""415416 expires = None417 if morsel['max-age']:418 try:418 expires = time.time() + float(morsel['max-age'])419 expires = time.time() + float(morsel['max-age'])420 except ValueError:421 pass422 elif morsel['expires']:423 time_template = '%a, %d-%b-%Y %H:%M:%S GMT'424 expires = time.mktime(425 time.strptime(morsel['expires'], time_template)) - time.timezone
57 unmodified lines