mirror of
https://github.com/kennethreitz/requests3.git
synced 2026-06-05 23:10:16 +00:00
max-age may be not digits
This commit is contained in:
+4
-1
@@ -415,7 +415,10 @@ def morsel_to_cookie(morsel):
|
||||
|
||||
expires = None
|
||||
if morsel['max-age']:
|
||||
expires = time.time() + float(morsel['max-age'])
|
||||
try:
|
||||
expires = time.time() + float(morsel['max-age'])
|
||||
except ValueError:
|
||||
pass
|
||||
elif morsel['expires']:
|
||||
time_template = '%a, %d-%b-%Y %H:%M:%S GMT'
|
||||
expires = time.mktime(
|
||||
|
||||
Reference in New Issue
Block a user