|
a/bottle.py |
|
b/bottle.py |
|
... |
|
... |
1420 |
if isinstance(value, timedelta):
|
1420 |
if isinstance(value, timedelta):
|
1421 |
value = value.seconds + value.days * 24 * 3600
|
1421 |
value = value.seconds + value.days * 24 * 3600
|
1422 |
if key == 'expires':
|
1422 |
if key == 'expires':
|
1423 |
if isinstance(value, (datedate, datetime)):
|
1423 |
if isinstance(value, (datedate, datetime)):
|
1424 |
value = value.timetuple()
|
1424 |
value = value.timetuple()
|
1425 |
elif isinstance(value, (int, float)):
|
1425 |
elif isinstance(value, (int, long, float)):
|
1426 |
value = time.gmtime(value)
|
1426 |
value = time.gmtime(value)
|
1427 |
value = time.strftime("%a, %d %b %Y %H:%M:%S GMT", value)
|
1427 |
value = time.strftime("%a, %d %b %Y %H:%M:%S GMT", value)
|
1428 |
self._cookies[name][key.replace('_', '-')] = value
|
1428 |
self._cookies[name][key.replace('_', '-')] = value
|
1429 |
|
1429 |
|
1430 |
def delete_cookie(self, key, **kwargs):
|
1430 |
def delete_cookie(self, key, **kwargs):
|