(c)
| 41 | |
| 42 | |
| 43 | def get_cookie_expiry(c): |
| 44 | if 'max-age' in c and c['max-age']: |
| 45 | try: |
| 46 | max_age_sec = int(c['max-age']) |
| 47 | return datetime.datetime.now() + datetime.timedelta(seconds=max_age_sec) |
| 48 | except Exception: |
| 49 | pass |
| 50 | # TODO: implement support for 'expires' cookie attribute as well. |
| 51 | return None |
| 52 | |
| 53 | |
| 54 | def get_cookies(resp_headers): |