Lines Matching refs:expires
206 expected = [[('foo', 'bar'), ('expires', 2209069412), ('version', '0')]]
208 'foo=bar; expires=01 Jan 2040 22:23:32 GMT',
209 'foo=bar; expires="01 Jan 2040 22:23:32 GMT"',
224 # names such as 'expires' are not special in first name=value pair
226 # Cookie with name 'expires'
227 hdr = 'expires=01 Jan 2040 22:23:32 GMT'
228 expected = [[("expires", "01 Jan 2040 22:23:32 GMT"), ("version", "0")]]
478 ## - Quoting: only quotes around the expires value are recognized as such
479 ## (and yes, some folks quote the expires value); quotes around any other
491 ## - Expires: You'll get all sorts of date formats in the expires,
492 ## including empty expires attributes ("expires="). Be as flexible as you
601 interact_netscape(c, "http://www.acme.com:80/", 'foo=bar; expires=')
603 'expires="Foo Bar 25 33:22:11 3022"')
627 # invalid expires should not cause cookie to be dropped
630 self.assertIsNone(foo.expires)
631 self.assertIsNone(spam.expires)
644 # names such as 'expires' are not special in first name=value pair
647 interact_netscape(c, "http://www.acme.com/", 'expires=eggs')
651 self.assertIn('expires', cookies)
655 # if expires is in future, keep cookie...
660 headers = [f"Set-Cookie: FOO=BAR; path=/; expires={future}"]
665 self.assertEqual(time2netscape(cookies[0].expires), future)
667 interact_netscape(c, "http://www.acme.com/", 'spam="bar"; expires=%s' %
672 interact_netscape(c, "http://www.acme.com/", 'foo="eggs"; expires=%s' %
679 # max-age takes precedence over expires, and zero max-age is request to
681 interact_netscape(c, "http://www.acme.com/", 'eggs="bar"; expires=%s' %
683 interact_netscape(c, "http://www.acme.com/", 'bar="bar"; expires=%s' %
687 'expires=%s; max-age=0' % future)
689 'max-age=0; expires=%s' % future)
693 # test expiry at end of session for cookies with no expires attribute
707 self.assertEqual(cookie.expires, 1444312383)
1374 # invalid expires value
1376 parse_ns_headers(["foo=bar; expires=Foo Bar 12 33:22:11 2000"]),
1377 [[("foo", "bar"), ("expires", None), ("version", "0")]]
1386 parse_ns_headers(['foo=bar; expires']),
1387 [[('foo', 'bar'), ('expires', None), ('version', '0')]])
1421 # cookie with invalid expires is treated as session cookie
1422 headers = ["Set-Cookie: c=foo; expires=Foo Bar 12 33:22:11 2000"]
1425 self.assertIsNone(cookie.expires)
1438 # Set-Cookie: CUSTOMER=WILE_E_COYOTE; path=/; expires=Wednesday, 09-Nov-99 23:12:40 GMT
1481 "expires=Wednesday, 09-Nov-%d 23:12:40 GMT" % year_plus_one)
1864 expires = "expires=09-Nov-%d 23:12:40 GMT" % (year_plus_one,)
1866 "fooa=bar; %s" % expires)
1868 "foob=bar; Domain=.foo.com; %s" % expires)
1870 "fooc=bar; Domain=www.foo.com; %s" % expires)
1985 "Path=/;expires=Fri, 02-Feb-%d 23:24:20 GMT" %
1987 headers.append("Set-Cookie: p2=perm;Path=/;expires=Fri, "