Skip to content
Myr

Merge branch 'max-age-pr'

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

authored by Ian Cordasco · committed by Ian Cordasco · parents 639f834, dd0f164 · Browse files · 1 file+6 added−3 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+6 added−3 removed

  • other:+6 added−3 removed

1 file+6 added−3 removed

modified:requests/cookies.py+6 added-3 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 expires = time.time() + morsel['max-age']418 try:419 expires = int(time.time() + int(morsel['max-age']))420 except ValueError:421 raise TypeError('max-age: %s must be integer' % morsel['max-age'])422 elif morsel['expires']:423 time_template = '%a, %d-%b-%Y %H:%M:%S GMT'421 expires = time.mktime(422 time.strptime(morsel['expires'], time_template)) - time.timezone424 expires = int(time.mktime(425 time.strptime(morsel['expires'], time_template)) - time.timezone)426 return create_cookie(427 comment=morsel['comment'],428 comment_url=bool(morsel['comment']),429 discard=False,
53 unmodified lines