aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLoïc Hoguin <[email protected]>2020-03-02 14:32:22 +0100
committerLoïc Hoguin <[email protected]>2020-03-04 16:50:53 +0100
commit4e10d5c132a7b3a72f035eb1a993eb378b97ab1d (patch)
tree48fe5d5ccf2b3822bdf43390b6390a95fa99eb0c
parentaaf29783cc1932bcc167c63cdcd064cd09b07be2 (diff)
downloadgun-4e10d5c132a7b3a72f035eb1a993eb378b97ab1d.tar.gz
gun-4e10d5c132a7b3a72f035eb1a993eb378b97ab1d.tar.bz2
gun-4e10d5c132a7b3a72f035eb1a993eb378b97ab1d.zip
Initial implementation of the gun_cookies cookie store
-rw-r--r--ebin/gun.app2
-rw-r--r--src/gun_cookies.erl570
-rw-r--r--src/gun_cookies_list.erl121
-rw-r--r--test/wpt/cookies/0001-expected1
-rw-r--r--test/wpt/cookies/0001-test1
-rw-r--r--test/wpt/cookies/0002-expected1
-rw-r--r--test/wpt/cookies/0002-test1
-rw-r--r--test/wpt/cookies/0003-expected1
-rw-r--r--test/wpt/cookies/0003-test2
-rw-r--r--test/wpt/cookies/0004-expected1
-rw-r--r--test/wpt/cookies/0004-test1
-rw-r--r--test/wpt/cookies/0005-expected1
-rw-r--r--test/wpt/cookies/0005-test1
-rw-r--r--test/wpt/cookies/0006-expected0
-rw-r--r--test/wpt/cookies/0006-test1
-rw-r--r--test/wpt/cookies/0007-expected1
-rw-r--r--test/wpt/cookies/0007-test1
-rw-r--r--test/wpt/cookies/0008-expected1
-rw-r--r--test/wpt/cookies/0008-test1
-rw-r--r--test/wpt/cookies/0009-expected1
-rw-r--r--test/wpt/cookies/0009-test1
-rw-r--r--test/wpt/cookies/0010-expected0
-rw-r--r--test/wpt/cookies/0010-test1
-rw-r--r--test/wpt/cookies/0011-expected1
-rw-r--r--test/wpt/cookies/0011-test1
-rw-r--r--test/wpt/cookies/0012-expected1
-rw-r--r--test/wpt/cookies/0012-test1
-rw-r--r--test/wpt/cookies/0013-expected1
-rw-r--r--test/wpt/cookies/0013-test2
-rw-r--r--test/wpt/cookies/0014-expected1
-rw-r--r--test/wpt/cookies/0014-test2
-rw-r--r--test/wpt/cookies/0015-expected1
-rw-r--r--test/wpt/cookies/0015-test2
-rw-r--r--test/wpt/cookies/0016-expected1
-rw-r--r--test/wpt/cookies/0016-test2
-rw-r--r--test/wpt/cookies/0017-expected2
-rw-r--r--test/wpt/cookies/0017-test1
-rw-r--r--test/wpt/cookies/0018-expected2
-rw-r--r--test/wpt/cookies/0018-test1
-rw-r--r--test/wpt/cookies/0019-expected1
-rw-r--r--test/wpt/cookies/0019-test1
-rw-r--r--test/wpt/cookies/0020-expected1
-rw-r--r--test/wpt/cookies/0020-test3
-rw-r--r--test/wpt/cookies/0021-expected1
-rw-r--r--test/wpt/cookies/0021-test3
-rw-r--r--test/wpt/cookies/0022-expected1
-rw-r--r--test/wpt/cookies/0022-test3
-rw-r--r--test/wpt/cookies/0023-expected1
-rw-r--r--test/wpt/cookies/0023-test2
-rw-r--r--test/wpt/cookies/0024-expected1
-rw-r--r--test/wpt/cookies/0024-test2
-rw-r--r--test/wpt/cookies/0025-expected1
-rw-r--r--test/wpt/cookies/0025-test2
-rw-r--r--test/wpt/cookies/0026-expected1
-rw-r--r--test/wpt/cookies/0026-test2
-rw-r--r--test/wpt/cookies/0027-expected1
-rw-r--r--test/wpt/cookies/0027-test2
-rw-r--r--test/wpt/cookies/0028-expected1
-rw-r--r--test/wpt/cookies/0028-test2
-rw-r--r--test/wpt/cookies/attribute0001-expected0
-rw-r--r--test/wpt/cookies/attribute0001-test1
-rw-r--r--test/wpt/cookies/attribute0002-expected0
-rw-r--r--test/wpt/cookies/attribute0002-test1
-rw-r--r--test/wpt/cookies/attribute0003-expected1
-rw-r--r--test/wpt/cookies/attribute0003-test1
-rw-r--r--test/wpt/cookies/attribute0004-expected0
-rw-r--r--test/wpt/cookies/attribute0004-test1
-rw-r--r--test/wpt/cookies/attribute0005-expected0
-rw-r--r--test/wpt/cookies/attribute0005-test1
-rw-r--r--test/wpt/cookies/attribute0006-expected1
-rw-r--r--test/wpt/cookies/attribute0006-test1
-rw-r--r--test/wpt/cookies/attribute0007-expected0
-rw-r--r--test/wpt/cookies/attribute0007-test1
-rw-r--r--test/wpt/cookies/attribute0008-expected0
-rw-r--r--test/wpt/cookies/attribute0008-test1
-rw-r--r--test/wpt/cookies/attribute0009-expected0
-rw-r--r--test/wpt/cookies/attribute0009-test1
-rw-r--r--test/wpt/cookies/attribute0010-expected0
-rw-r--r--test/wpt/cookies/attribute0010-test1
-rw-r--r--test/wpt/cookies/attribute0011-expected0
-rw-r--r--test/wpt/cookies/attribute0011-test1
-rw-r--r--test/wpt/cookies/attribute0012-expected0
-rw-r--r--test/wpt/cookies/attribute0012-test1
-rw-r--r--test/wpt/cookies/attribute0013-expected0
-rw-r--r--test/wpt/cookies/attribute0013-test1
-rw-r--r--test/wpt/cookies/attribute0014-expected1
-rw-r--r--test/wpt/cookies/attribute0014-test1
-rw-r--r--test/wpt/cookies/attribute0015-expected1
-rw-r--r--test/wpt/cookies/attribute0015-test1
-rw-r--r--test/wpt/cookies/attribute0016-expected1
-rw-r--r--test/wpt/cookies/attribute0016-test1
-rw-r--r--test/wpt/cookies/attribute0017-expected0
-rw-r--r--test/wpt/cookies/attribute0017-test1
-rw-r--r--test/wpt/cookies/attribute0018-expected0
-rw-r--r--test/wpt/cookies/attribute0018-test1
-rw-r--r--test/wpt/cookies/attribute0019-expected0
-rw-r--r--test/wpt/cookies/attribute0019-test1
-rw-r--r--test/wpt/cookies/attribute0020-expected0
-rw-r--r--test/wpt/cookies/attribute0020-test1
-rw-r--r--test/wpt/cookies/attribute0021-expected1
-rw-r--r--test/wpt/cookies/attribute0021-test1
-rw-r--r--test/wpt/cookies/attribute0022-expected0
-rw-r--r--test/wpt/cookies/attribute0022-test1
-rw-r--r--test/wpt/cookies/attribute0023-expected0
-rw-r--r--test/wpt/cookies/attribute0023-test1
-rw-r--r--test/wpt/cookies/attribute0024-expected0
-rw-r--r--test/wpt/cookies/attribute0024-test1
-rw-r--r--test/wpt/cookies/attribute0025-expected0
-rw-r--r--test/wpt/cookies/attribute0025-test1
-rw-r--r--test/wpt/cookies/attribute0026-expected0
-rw-r--r--test/wpt/cookies/attribute0026-test1
-rw-r--r--test/wpt/cookies/charset0001-expected1
-rw-r--r--test/wpt/cookies/charset0001-test1
-rw-r--r--test/wpt/cookies/charset0002-expected1
-rw-r--r--test/wpt/cookies/charset0002-test1
-rw-r--r--test/wpt/cookies/charset0003-expected1
-rw-r--r--test/wpt/cookies/charset0003-test1
-rw-r--r--test/wpt/cookies/charset0004-expected1
-rw-r--r--test/wpt/cookies/charset0004-test1
-rw-r--r--test/wpt/cookies/chromium0001-expected1
-rw-r--r--test/wpt/cookies/chromium0001-test1
-rw-r--r--test/wpt/cookies/chromium0002-expected1
-rw-r--r--test/wpt/cookies/chromium0002-test1
-rw-r--r--test/wpt/cookies/chromium0003-expected1
-rw-r--r--test/wpt/cookies/chromium0003-test1
-rw-r--r--test/wpt/cookies/chromium0004-expected1
-rw-r--r--test/wpt/cookies/chromium0004-test1
-rw-r--r--test/wpt/cookies/chromium0005-expected1
-rw-r--r--test/wpt/cookies/chromium0005-test1
-rw-r--r--test/wpt/cookies/chromium0006-expected1
-rw-r--r--test/wpt/cookies/chromium0006-test1
-rw-r--r--test/wpt/cookies/chromium0007-expected1
-rw-r--r--test/wpt/cookies/chromium0007-test1
-rw-r--r--test/wpt/cookies/chromium0008-expected1
-rw-r--r--test/wpt/cookies/chromium0008-test1
-rw-r--r--test/wpt/cookies/chromium0009-expected0
-rw-r--r--test/wpt/cookies/chromium0009-test1
-rw-r--r--test/wpt/cookies/chromium0010-expected0
-rw-r--r--test/wpt/cookies/chromium0010-test1
-rw-r--r--test/wpt/cookies/chromium0011-expected1
-rw-r--r--test/wpt/cookies/chromium0011-test1
-rw-r--r--test/wpt/cookies/chromium0012-expected0
-rw-r--r--test/wpt/cookies/chromium0012-test1
-rw-r--r--test/wpt/cookies/chromium0013-expected1
-rw-r--r--test/wpt/cookies/chromium0013-test1
-rw-r--r--test/wpt/cookies/chromium0014-expected1
-rw-r--r--test/wpt/cookies/chromium0014-test1
-rw-r--r--test/wpt/cookies/chromium0015-expected1
-rw-r--r--test/wpt/cookies/chromium0015-test1
-rw-r--r--test/wpt/cookies/chromium0016-expected1
-rw-r--r--test/wpt/cookies/chromium0016-test1
-rw-r--r--test/wpt/cookies/chromium0017-expected1
-rw-r--r--test/wpt/cookies/chromium0017-test1
-rw-r--r--test/wpt/cookies/chromium0018-expected0
-rw-r--r--test/wpt/cookies/chromium0018-test1
-rw-r--r--test/wpt/cookies/chromium0019-expected1
-rw-r--r--test/wpt/cookies/chromium0019-test1
-rw-r--r--test/wpt/cookies/chromium0021-expected0
-rw-r--r--test/wpt/cookies/chromium0021-test1
-rw-r--r--test/wpt/cookies/comma0001-expected1
-rw-r--r--test/wpt/cookies/comma0001-test1
-rw-r--r--test/wpt/cookies/comma0002-expected1
-rw-r--r--test/wpt/cookies/comma0002-test1
-rw-r--r--test/wpt/cookies/comma0003-expected1
-rw-r--r--test/wpt/cookies/comma0003-test1
-rw-r--r--test/wpt/cookies/comma0004-expected1
-rw-r--r--test/wpt/cookies/comma0004-test1
-rw-r--r--test/wpt/cookies/comma0005-expected1
-rw-r--r--test/wpt/cookies/comma0005-test1
-rw-r--r--test/wpt/cookies/comma0006-expected1
-rw-r--r--test/wpt/cookies/comma0006-test1
-rw-r--r--test/wpt/cookies/comma0007-expected1
-rw-r--r--test/wpt/cookies/comma0007-test1
-rw-r--r--test/wpt/cookies/disabled-chromium0020-expected0
-rw-r--r--test/wpt/cookies/disabled-chromium0020-test1
-rw-r--r--test/wpt/cookies/disabled-chromium0022-expected1
-rw-r--r--test/wpt/cookies/disabled-chromium0022-test1
-rw-r--r--test/wpt/cookies/disabled-path0029-expected1
-rw-r--r--test/wpt/cookies/disabled-path0029-test2
-rw-r--r--test/wpt/cookies/domain0001-expected1
-rw-r--r--test/wpt/cookies/domain0001-test2
-rw-r--r--test/wpt/cookies/domain0002-expected0
-rw-r--r--test/wpt/cookies/domain0002-test2
-rw-r--r--test/wpt/cookies/domain0003-expected1
-rw-r--r--test/wpt/cookies/domain0003-test2
-rw-r--r--test/wpt/cookies/domain0004-expected1
-rw-r--r--test/wpt/cookies/domain0004-test2
-rw-r--r--test/wpt/cookies/domain0005-expected1
-rw-r--r--test/wpt/cookies/domain0005-test2
-rw-r--r--test/wpt/cookies/domain0006-expected0
-rw-r--r--test/wpt/cookies/domain0006-test2
-rw-r--r--test/wpt/cookies/domain0007-expected0
-rw-r--r--test/wpt/cookies/domain0007-test2
-rw-r--r--test/wpt/cookies/domain0008-expected1
-rw-r--r--test/wpt/cookies/domain0008-test2
-rw-r--r--test/wpt/cookies/domain0009-expected1
-rw-r--r--test/wpt/cookies/domain0009-test2
-rw-r--r--test/wpt/cookies/domain0010-expected0
-rw-r--r--test/wpt/cookies/domain0010-test2
-rw-r--r--test/wpt/cookies/domain0011-expected0
-rw-r--r--test/wpt/cookies/domain0011-test2
-rw-r--r--test/wpt/cookies/domain0012-expected1
-rw-r--r--test/wpt/cookies/domain0012-test2
-rw-r--r--test/wpt/cookies/domain0013-expected0
-rw-r--r--test/wpt/cookies/domain0013-test2
-rw-r--r--test/wpt/cookies/domain0014-expected0
-rw-r--r--test/wpt/cookies/domain0014-test2
-rw-r--r--test/wpt/cookies/domain0015-expected0
-rw-r--r--test/wpt/cookies/domain0015-test2
-rw-r--r--test/wpt/cookies/domain0016-expected0
-rw-r--r--test/wpt/cookies/domain0016-test2
-rw-r--r--test/wpt/cookies/domain0017-expected0
-rw-r--r--test/wpt/cookies/domain0017-test2
-rw-r--r--test/wpt/cookies/domain0018-expected0
-rw-r--r--test/wpt/cookies/domain0018-test2
-rw-r--r--test/wpt/cookies/domain0019-expected1
-rw-r--r--test/wpt/cookies/domain0019-test3
-rw-r--r--test/wpt/cookies/domain0020-expected1
-rw-r--r--test/wpt/cookies/domain0020-test3
-rw-r--r--test/wpt/cookies/domain0021-expected0
-rw-r--r--test/wpt/cookies/domain0021-test2
-rw-r--r--test/wpt/cookies/domain0022-expected1
-rw-r--r--test/wpt/cookies/domain0022-test3
-rw-r--r--test/wpt/cookies/domain0023-expected1
-rw-r--r--test/wpt/cookies/domain0023-test3
-rw-r--r--test/wpt/cookies/domain0024-expected0
-rw-r--r--test/wpt/cookies/domain0024-test2
-rw-r--r--test/wpt/cookies/domain0025-expected1
-rw-r--r--test/wpt/cookies/domain0025-test2
-rw-r--r--test/wpt/cookies/domain0026-expected1
-rw-r--r--test/wpt/cookies/domain0026-test2
-rw-r--r--test/wpt/cookies/domain0027-expected0
-rw-r--r--test/wpt/cookies/domain0027-test2
-rw-r--r--test/wpt/cookies/domain0028-expected0
-rw-r--r--test/wpt/cookies/domain0028-test2
-rw-r--r--test/wpt/cookies/domain0029-expected0
-rw-r--r--test/wpt/cookies/domain0029-test2
-rw-r--r--test/wpt/cookies/domain0031-expected1
-rw-r--r--test/wpt/cookies/domain0031-test2
-rw-r--r--test/wpt/cookies/domain0033-expected1
-rw-r--r--test/wpt/cookies/domain0033-test2
-rw-r--r--test/wpt/cookies/domain0034-expected0
-rw-r--r--test/wpt/cookies/domain0034-test2
-rw-r--r--test/wpt/cookies/domain0035-expected1
-rw-r--r--test/wpt/cookies/domain0035-test2
-rw-r--r--test/wpt/cookies/domain0036-expected1
-rw-r--r--test/wpt/cookies/domain0036-test2
-rw-r--r--test/wpt/cookies/domain0037-expected0
-rw-r--r--test/wpt/cookies/domain0037-test2
-rw-r--r--test/wpt/cookies/domain0038-expected1
-rw-r--r--test/wpt/cookies/domain0038-test2
-rw-r--r--test/wpt/cookies/domain0039-expected1
-rw-r--r--test/wpt/cookies/domain0039-test2
-rw-r--r--test/wpt/cookies/domain0040-expected1
-rw-r--r--test/wpt/cookies/domain0040-test2
-rw-r--r--test/wpt/cookies/domain0041-expected0
-rw-r--r--test/wpt/cookies/domain0041-test2
-rw-r--r--test/wpt/cookies/domain0042-expected0
-rw-r--r--test/wpt/cookies/domain0042-test2
-rw-r--r--test/wpt/cookies/mozilla0001-expected0
-rw-r--r--test/wpt/cookies/mozilla0001-test1
-rw-r--r--test/wpt/cookies/mozilla0002-expected0
-rw-r--r--test/wpt/cookies/mozilla0002-test1
-rw-r--r--test/wpt/cookies/mozilla0003-expected0
-rw-r--r--test/wpt/cookies/mozilla0003-test1
-rw-r--r--test/wpt/cookies/mozilla0004-expected1
-rw-r--r--test/wpt/cookies/mozilla0004-test1
-rw-r--r--test/wpt/cookies/mozilla0005-expected0
-rw-r--r--test/wpt/cookies/mozilla0005-test1
-rw-r--r--test/wpt/cookies/mozilla0006-expected1
-rw-r--r--test/wpt/cookies/mozilla0006-test1
-rw-r--r--test/wpt/cookies/mozilla0007-expected0
-rw-r--r--test/wpt/cookies/mozilla0007-test1
-rw-r--r--test/wpt/cookies/mozilla0008-expected1
-rw-r--r--test/wpt/cookies/mozilla0008-test2
-rw-r--r--test/wpt/cookies/mozilla0009-expected1
-rw-r--r--test/wpt/cookies/mozilla0009-test3
-rw-r--r--test/wpt/cookies/mozilla0010-expected1
-rw-r--r--test/wpt/cookies/mozilla0010-test4
-rw-r--r--test/wpt/cookies/mozilla0011-expected0
-rw-r--r--test/wpt/cookies/mozilla0011-test1
-rw-r--r--test/wpt/cookies/mozilla0012-expected1
-rw-r--r--test/wpt/cookies/mozilla0012-test2
-rw-r--r--test/wpt/cookies/mozilla0013-expected0
-rw-r--r--test/wpt/cookies/mozilla0013-test2
-rw-r--r--test/wpt/cookies/mozilla0014-expected0
-rw-r--r--test/wpt/cookies/mozilla0014-test1
-rw-r--r--test/wpt/cookies/mozilla0015-expected0
-rw-r--r--test/wpt/cookies/mozilla0015-test2
-rw-r--r--test/wpt/cookies/mozilla0016-expected0
-rw-r--r--test/wpt/cookies/mozilla0016-test3
-rw-r--r--test/wpt/cookies/mozilla0017-expected1
-rw-r--r--test/wpt/cookies/mozilla0017-test4
-rw-r--r--test/wpt/cookies/name0001-expected1
-rw-r--r--test/wpt/cookies/name0001-test1
-rw-r--r--test/wpt/cookies/name0002-expected1
-rw-r--r--test/wpt/cookies/name0002-test1
-rw-r--r--test/wpt/cookies/name0003-expected1
-rw-r--r--test/wpt/cookies/name0003-test1
-rw-r--r--test/wpt/cookies/name0004-expected1
-rw-r--r--test/wpt/cookies/name0004-test1
-rw-r--r--test/wpt/cookies/name0005-expected1
-rw-r--r--test/wpt/cookies/name0005-test1
-rw-r--r--test/wpt/cookies/name0006-expected1
-rw-r--r--test/wpt/cookies/name0006-test1
-rw-r--r--test/wpt/cookies/name0007-expected1
-rw-r--r--test/wpt/cookies/name0007-test1
-rw-r--r--test/wpt/cookies/name0008-expected1
-rw-r--r--test/wpt/cookies/name0008-test1
-rw-r--r--test/wpt/cookies/name0009-expected1
-rw-r--r--test/wpt/cookies/name0009-test1
-rw-r--r--test/wpt/cookies/name0010-expected1
-rw-r--r--test/wpt/cookies/name0010-test1
-rw-r--r--test/wpt/cookies/name0011-expected1
-rw-r--r--test/wpt/cookies/name0011-test1
-rw-r--r--test/wpt/cookies/name0012-expected1
-rw-r--r--test/wpt/cookies/name0012-test1
-rw-r--r--test/wpt/cookies/name0013-expected1
-rw-r--r--test/wpt/cookies/name0013-test1
-rw-r--r--test/wpt/cookies/name0014-expected1
-rw-r--r--test/wpt/cookies/name0014-test1
-rw-r--r--test/wpt/cookies/name0015-expected1
-rw-r--r--test/wpt/cookies/name0015-test1
-rw-r--r--test/wpt/cookies/name0016-expected1
-rw-r--r--test/wpt/cookies/name0016-test1
-rw-r--r--test/wpt/cookies/name0017-expected0
-rw-r--r--test/wpt/cookies/name0017-test1
-rw-r--r--test/wpt/cookies/name0018-expected1
-rw-r--r--test/wpt/cookies/name0018-test1
-rw-r--r--test/wpt/cookies/name0019-expected1
-rw-r--r--test/wpt/cookies/name0019-test1
-rw-r--r--test/wpt/cookies/name0020-expected1
-rw-r--r--test/wpt/cookies/name0020-test1
-rw-r--r--test/wpt/cookies/name0021-expected1
-rw-r--r--test/wpt/cookies/name0021-test2
-rw-r--r--test/wpt/cookies/name0022-expected1
-rw-r--r--test/wpt/cookies/name0022-test1
-rw-r--r--test/wpt/cookies/name0023-expected0
-rw-r--r--test/wpt/cookies/name0023-test1
-rw-r--r--test/wpt/cookies/name0024-expected1
-rw-r--r--test/wpt/cookies/name0024-test1
-rw-r--r--test/wpt/cookies/name0025-expected0
-rw-r--r--test/wpt/cookies/name0025-test1
-rw-r--r--test/wpt/cookies/name0026-expected1
-rw-r--r--test/wpt/cookies/name0026-test1
-rw-r--r--test/wpt/cookies/name0027-expected1
-rw-r--r--test/wpt/cookies/name0027-test1
-rw-r--r--test/wpt/cookies/name0028-expected0
-rw-r--r--test/wpt/cookies/name0028-test1
-rw-r--r--test/wpt/cookies/name0029-expected0
-rw-r--r--test/wpt/cookies/name0029-test1
-rw-r--r--test/wpt/cookies/name0030-expected1
-rw-r--r--test/wpt/cookies/name0030-test1
-rw-r--r--test/wpt/cookies/name0031-expected0
-rw-r--r--test/wpt/cookies/name0031-test1
-rw-r--r--test/wpt/cookies/name0032-expected0
-rw-r--r--test/wpt/cookies/name0032-test1
-rw-r--r--test/wpt/cookies/name0033-expected0
-rw-r--r--test/wpt/cookies/name0033-test2
-rw-r--r--test/wpt/cookies/optional-domain0030-expected1
-rw-r--r--test/wpt/cookies/optional-domain0030-test2
-rw-r--r--test/wpt/cookies/optional-domain0041-expected1
-rw-r--r--test/wpt/cookies/optional-domain0041-test2
-rw-r--r--test/wpt/cookies/optional-domain0042-expected1
-rw-r--r--test/wpt/cookies/optional-domain0042-test2
-rw-r--r--test/wpt/cookies/optional-domain0043-expected0
-rw-r--r--test/wpt/cookies/optional-domain0043-test2
-rw-r--r--test/wpt/cookies/ordering0001-expected1
-rw-r--r--test/wpt/cookies/ordering0001-test7
-rw-r--r--test/wpt/cookies/path0001-expected1
-rw-r--r--test/wpt/cookies/path0001-test2
-rw-r--r--test/wpt/cookies/path0002-expected1
-rw-r--r--test/wpt/cookies/path0002-test2
-rw-r--r--test/wpt/cookies/path0003-expected1
-rw-r--r--test/wpt/cookies/path0003-test2
-rw-r--r--test/wpt/cookies/path0004-expected1
-rw-r--r--test/wpt/cookies/path0004-test2
-rw-r--r--test/wpt/cookies/path0005-expected0
-rw-r--r--test/wpt/cookies/path0005-test1
-rw-r--r--test/wpt/cookies/path0006-expected1
-rw-r--r--test/wpt/cookies/path0006-test2
-rw-r--r--test/wpt/cookies/path0007-expected1
-rw-r--r--test/wpt/cookies/path0007-test2
-rw-r--r--test/wpt/cookies/path0008-expected0
-rw-r--r--test/wpt/cookies/path0008-test2
-rw-r--r--test/wpt/cookies/path0009-expected0
-rw-r--r--test/wpt/cookies/path0009-test2
-rw-r--r--test/wpt/cookies/path0010-expected1
-rw-r--r--test/wpt/cookies/path0010-test2
-rw-r--r--test/wpt/cookies/path0011-expected0
-rw-r--r--test/wpt/cookies/path0011-test2
-rw-r--r--test/wpt/cookies/path0012-expected0
-rw-r--r--test/wpt/cookies/path0012-test2
-rw-r--r--test/wpt/cookies/path0013-expected0
-rw-r--r--test/wpt/cookies/path0013-test2
-rw-r--r--test/wpt/cookies/path0014-expected0
-rw-r--r--test/wpt/cookies/path0014-test2
-rw-r--r--test/wpt/cookies/path0015-expected1
-rw-r--r--test/wpt/cookies/path0015-test2
-rw-r--r--test/wpt/cookies/path0016-expected1
-rw-r--r--test/wpt/cookies/path0016-test2
-rw-r--r--test/wpt/cookies/path0017-expected1
-rw-r--r--test/wpt/cookies/path0017-test2
-rw-r--r--test/wpt/cookies/path0018-expected0
-rw-r--r--test/wpt/cookies/path0018-test2
-rw-r--r--test/wpt/cookies/path0019-expected1
-rw-r--r--test/wpt/cookies/path0019-test1
-rw-r--r--test/wpt/cookies/path0020-expected1
-rw-r--r--test/wpt/cookies/path0020-test1
-rw-r--r--test/wpt/cookies/path0021-expected1
-rw-r--r--test/wpt/cookies/path0021-test1
-rw-r--r--test/wpt/cookies/path0022-expected1
-rw-r--r--test/wpt/cookies/path0022-test1
-rw-r--r--test/wpt/cookies/path0023-expected0
-rw-r--r--test/wpt/cookies/path0023-test1
-rw-r--r--test/wpt/cookies/path0024-expected0
-rw-r--r--test/wpt/cookies/path0024-test2
-rw-r--r--test/wpt/cookies/path0025-expected0
-rw-r--r--test/wpt/cookies/path0025-test2
-rw-r--r--test/wpt/cookies/path0026-expected1
-rw-r--r--test/wpt/cookies/path0026-test2
-rw-r--r--test/wpt/cookies/path0027-expected1
-rw-r--r--test/wpt/cookies/path0027-test2
-rw-r--r--test/wpt/cookies/path0028-expected0
-rw-r--r--test/wpt/cookies/path0028-test2
-rw-r--r--test/wpt/cookies/path0029-expected1
-rw-r--r--test/wpt/cookies/path0029-test2
-rw-r--r--test/wpt/cookies/path0030-expected1
-rw-r--r--test/wpt/cookies/path0030-test1
-rw-r--r--test/wpt/cookies/path0031-expected0
-rw-r--r--test/wpt/cookies/path0031-test1
-rw-r--r--test/wpt/cookies/path0032-expected1
-rw-r--r--test/wpt/cookies/path0032-test3
-rw-r--r--test/wpt/cookies/value0001-expected1
-rw-r--r--test/wpt/cookies/value0001-test1
-rw-r--r--test/wpt/cookies/value0002-expected1
-rw-r--r--test/wpt/cookies/value0002-test1
-rw-r--r--test/wpt/cookies/value0003-expected1
-rw-r--r--test/wpt/cookies/value0003-test1
-rw-r--r--test/wpt/cookies/value0004-expected1
-rw-r--r--test/wpt/cookies/value0004-test1
-rw-r--r--test/wpt/cookies/value0005-expected1
-rw-r--r--test/wpt/cookies/value0005-test1
-rw-r--r--test/wpt/cookies/value0006-expected1
-rw-r--r--test/wpt/cookies/value0006-test1
445 files changed, 1169 insertions, 1 deletions
diff --git a/ebin/gun.app b/ebin/gun.app
index 34bd62c..7a45497 100644
--- a/ebin/gun.app
+++ b/ebin/gun.app
@@ -1,7 +1,7 @@
{application, 'gun', [
{description, "HTTP/1.1, HTTP/2 and Websocket client for Erlang/OTP."},
{vsn, "2.0.0-pre.1"},
- {modules, ['gun','gun_app','gun_content_handler','gun_data_h','gun_default_event_h','gun_event','gun_http','gun_http2','gun_raw','gun_socks','gun_sse_h','gun_sup','gun_tcp','gun_tls','gun_tls_proxy','gun_tls_proxy_cb','gun_ws','gun_ws_h']},
+ {modules, ['gun','gun_app','gun_content_handler','gun_cookies','gun_cookies_list','gun_data_h','gun_default_event_h','gun_event','gun_http','gun_http2','gun_raw','gun_socks','gun_sse_h','gun_sup','gun_tcp','gun_tls','gun_tls_proxy','gun_tls_proxy_cb','gun_ws','gun_ws_h']},
{registered, [gun_sup]},
{applications, [kernel,stdlib,ssl,cowlib]},
{mod, {gun_app, []}},
diff --git a/src/gun_cookies.erl b/src/gun_cookies.erl
new file mode 100644
index 0000000..1c84ba9
--- /dev/null
+++ b/src/gun_cookies.erl
@@ -0,0 +1,570 @@
+%% Copyright (c) 2020, Loïc Hoguin <[email protected]>
+%%
+%% Permission to use, copy, modify, and/or distribute this software for any
+%% purpose with or without fee is hereby granted, provided that the above
+%% copyright notice and this permission notice appear in all copies.
+%%
+%% THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
+%% WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
+%% MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
+%% ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
+%% WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
+%% ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
+%% OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+
+%% @todo A test suite can be created based on https://github.com/web-platform-tests/wpt/tree/master/cookies
+-module(gun_cookies).
+
+-export([domain_match/2]).
+-export([gc/1]).
+-export([path_match/2]).
+-export([query/2]).
+-export([session_gc/1]).
+-export([set_cookie/5]).
+
+-type store_state() :: any().
+
+-type store() :: {module(), store_state()}.
+-export_type([store/0]).
+
+-type cookie() :: #{
+ name := binary(),
+ value := binary(),
+ domain := binary(),
+ path := binary(),
+ creation_time := calendar:datetime(),
+ last_access_time := calendar:datetime(),
+ expiry_time := calendar:datetime(),
+ persistent := boolean(),
+ host_only => boolean(),
+ secure_only := boolean(),
+ http_only := boolean(),
+ same_site := strict | lax | none
+}.
+-export_type([cookie/0]).
+
+-callback init() -> store().
+
+-callback query(State, uri_string:uri_map())
+ -> {ok, [{binary(), binary()}], State}
+ when State::store_state().
+
+-callback set_cookie_secure_match(store_state(), #{
+ name := binary(),
+% secure_only := true,
+ domain := binary(),
+ path := binary()
+}) -> match | nomatch.
+
+-callback set_cookie_exact_match(store_state(), #{
+ name := binary(),
+ domain := binary(),
+ host_only := boolean(),
+ path := binary()
+}) -> {match, cookie()} | nomatch.
+
+-callback store(State, cookie())
+ -> {ok, State} | {error, any()}
+ when State::store_state().
+
+-spec domain_match(binary(), binary()) -> boolean().
+domain_match(String, String) ->
+ true;
+domain_match(String, DomainString) ->
+ SkipLen = byte_size(String) - byte_size(DomainString) - 1,
+ case String of
+ <<_:SkipLen/unit:8, $., DomainString/binary>> ->
+ case inet:parse_strict_address(binary_to_list(String)) of
+ {ok, _} ->
+ false;
+ {error, einval} ->
+ true
+ end;
+ _ ->
+ false
+ end.
+
+-spec gc(Store) -> {ok, Store} when Store::store().
+gc(Store) ->
+%The user agent MUST evict all expired cookies from the cookie store if, at any time, an expired cookie exists in the cookie store.
+%At any time, the user agent MAY “remove excess cookies” from the cookie store if the number of cookies sharing a domain field exceeds some implementation-defined upper bound (such as 50 cookies).
+%At any time, the user agent MAY “remove excess cookies” from the cookie store if the cookie store exceeds some predetermined upper bound (such as 3000 cookies).
+ {todo, Store}.
+
+-spec path_match(binary(), binary()) -> boolean().
+path_match(Path, Path) ->
+ true;
+path_match(ReqPath, CookiePath) ->
+ Len = byte_size(CookiePath),
+ CookieLast = binary:last(CookiePath),
+ case ReqPath of
+ <<CookiePath:Len/binary, _/bits>> when CookieLast =:= $/ ->
+ true;
+ <<CookiePath:Len/binary, $/, _/bits>> ->
+ true;
+ _ ->
+ false
+ end.
+
+-ifdef(TEST).
+path_match_test_() ->
+ Tests = [
+ {<<"/">>, <<"/">>, true},
+ {<<"/path/to/resource">>, <<"/path/to/resource">>, true},
+ {<<"/path/">>, <<"/path/">>, true},
+ {<<"/path/to/resource">>, <<"/path/">>, true},
+ {<<"/path/to/resource">>, <<"/path">>, true},
+ {<<"/path/to/resource">>, <<"/path/to/">>, true},
+ {<<"/path/to/resource">>, <<"/path/to">>, true},
+ {<<"/path/to/resource">>, <<"/pa">>, false},
+ {<<"/path/to/resource">>, <<"/pat">>, false},
+ {<<"/path/to/resource">>, <<"/path/to/r">>, false},
+ {<<"/abc">>, <<"/def">>, false}
+ ],
+ [{iolist_to_binary(io_lib:format("(~p,~p)", [PA, PB])),
+ fun() -> Res = path_match(PA, PB) end}
+ || {PA, PB, Res} <- Tests].
+-endif.
+
+%% @todo The given URI must be normalized.
+-spec query(Store, uri_string:uri_map())
+ -> {ok, [{binary(), binary()}], Store}
+ when Store::store().
+query({Mod, State0}, URI) ->
+ {ok, Cookies0, State} = Mod:query(State0, URI),
+ Cookies = lists:sort(fun
+ (#{path := P, creation_time := CTA}, #{path := P, creation_time := CTB}) ->
+ CTA =< CTB;
+ (#{path := PA}, #{path := PB}) ->
+ PA > PB
+ end, Cookies0),
+ {ok, Cookies, {Mod, State}}.
+
+-spec session_gc(Store) -> {ok, Store} when Store::store().
+session_gc(Store) ->
+%When “the current session is over” (as defined by the user agent), the user agent MUST remove from the cookie store all cookies with the persistent-flag set to false.
+ {todo, Store}.
+
+%% @todo Not cookie_opts()
+%% @todo The given URI must be normalized.
+-spec set_cookie(Store, uri_string:uri_map(), binary(), binary(), cow_cookie:cookie_opts())
+ -> {ok, Store} | {error, any()} when Store::store().
+set_cookie(Store, URI, Name, Value, Attrs) ->
+ %% @todo This is where we would add a feature to block cookies (like a blacklist).
+ CurrentTime = erlang:universaltime(),
+ Cookie0 = #{
+ name => Name,
+ value => Value,
+ creation_time => CurrentTime,
+ last_access_time => CurrentTime
+ },
+ Cookie = case Attrs of
+ #{max_age := ExpiryTime} ->
+ Cookie0#{
+ persistent => true,
+ expiry_time => ExpiryTime
+ };
+ #{expires := ExpiryTime} ->
+ Cookie0#{
+ persistent => true,
+ expiry_time => ExpiryTime
+ };
+ _ ->
+ Cookie0#{
+ persistent => false,
+ expiry_time => infinity
+ }
+ end,
+ Domain = maps:get(domain, Attrs, <<>>),
+ %% @todo This is where we would reject public suffixes. https://publicsuffix.org/
+ case Domain of
+ <<>> ->
+ set_cookie(Store, URI, Attrs, Cookie#{
+ host_only => true,
+ domain => maps:get(host, URI)
+ });
+ _ ->
+ %% @todo Domain must already be canonicalized here.
+ case domain_match(maps:get(host, URI), Domain) of
+ true ->
+ set_cookie(Store, URI, Attrs, Cookie#{
+ host_only => false,
+ domain => Domain
+ });
+ false ->
+ {error, domain_match_failed}
+ end
+ end.
+
+set_cookie(Store, URI, Attrs, Cookie0) ->
+ Cookie1 = case Attrs of
+ #{path := Path} ->
+ Cookie0#{path => Path};
+ _ ->
+ Cookie0#{path => default_path(URI)}
+ end,
+ SecureOnly = maps:get(secure, Attrs, false),
+ case {SecureOnly, maps:get(scheme, URI)} of
+ {true, <<"http">>} ->
+ {error, secure_scheme_only};
+ _ ->
+ Cookie = Cookie1#{
+ secure_only => SecureOnly,
+ http_only => maps:get(http_only, Attrs, false)
+ },
+ %% @todo This is where we would drop cookies from non-HTTP APIs.
+ set_cookie1(Store, URI, Attrs, Cookie)
+ end.
+
+default_path(#{path := Path}) ->
+ case string:split(Path, <<"/">>, trailing) of
+ [_] -> <<"/">>;
+ [<<>>, _] -> <<"/">>;
+ [DefaultPath, _] -> DefaultPath
+ end;
+default_path(_) ->
+ <<"/">>.
+
+set_cookie1(Store, URI=#{scheme := <<"http">>}, Attrs, Cookie=#{secure_only := false}) ->
+ Match = maps:with([name, domain, path], Cookie),
+ case set_cookie_secure_match(Store, Match) of
+ match ->
+ {error, secure_cookie_matches};
+ nomatch ->
+ set_cookie2(Store, URI, Attrs, Cookie)
+ end;
+set_cookie1(Store, URI, Attrs, Cookie) ->
+ set_cookie2(Store, URI, Attrs, Cookie).
+
+set_cookie_secure_match({Mod, State}, Match) ->
+ Mod:set_cookie_secure_match(State, Match).
+
+set_cookie2(Store, _URI, Attrs, Cookie0) ->
+ Cookie = Cookie0#{same_site => maps:get(same_site, Attrs, none)},
+ %% @todo This is where we would perform the same-site checks.
+ %%
+ %% It seems that an option would need to be added to Gun
+ %% in order to define the "site for cookies" value. It is
+ %% not the same as the site identified by the URI. Although
+ %% I do wonder if in the case of server push we may consider
+ %% the requested URI to be the "site for cookies", at least
+ %% by default.
+ %%
+ %% The URI argument will be used if/when the above gets
+ %% implemented.
+ set_cookie3(Store, Attrs, Cookie).
+
+set_cookie3(Store, Attrs, Cookie=#{name := Name,
+ host_only := HostOnly, secure_only := SecureOnly}) ->
+ Path = maps:get(path, Attrs, undefined),
+ case Name of
+ <<"__Secure-",_/bits>> when not SecureOnly ->
+ {error, name_prefix_secure_requires_secure_only};
+ <<"__Host-",_/bits>> when not SecureOnly ->
+ {error, name_prefix_host_requires_secure_only};
+ <<"__Host-",_/bits>> when not HostOnly ->
+ {error, name_prefix_host_requires_host_only};
+ <<"__Host-",_/bits>> when Path =/= <<"/">> ->
+ {error, name_prefix_host_requires_top_level_path};
+ _ ->
+ set_cookie_store(Store, Cookie)
+ end.
+
+%% @todo Cookies with an expiry_time in the past result in the cookie getting deleted.
+set_cookie_store(Store0, Cookie) ->
+ Match = maps:with([name, domain, host_only, path], Cookie),
+ case set_cookie_take_exact_match(Store0, Match) of
+ {ok, #{creation_time := CreationTime}, Store} ->
+ %% @todo This is where we would reject a new non-HTTP cookie
+ %% if the OldCookie has http_only set to true.
+ store(Store, Cookie#{creation_time => CreationTime});
+ error ->
+ store(Store0, Cookie)
+ end.
+
+set_cookie_take_exact_match({Mod, State0}, Match) ->
+ case Mod:set_cookie_take_exact_match(State0, Match) of
+ {ok, Cookie, State} ->
+ {ok, Cookie, {Mod, State}};
+ Error ->
+ Error
+ end.
+
+store({Mod, State0}, Cookie) ->
+ case Mod:store(State0, Cookie) of
+ {ok, State} ->
+ {ok, {Mod, State}};
+ %% @todo Is this return value useful? Can't it just return {ok, State}?
+ Error ->
+ Error
+ end.
+
+-ifdef(TEST).
+%% Most of the tests for this module are converted from the
+%% Web platform test suite. At the time of writing they could
+%% be found at https://github.com/web-platform-tests/wpt/tree/master/cookies
+%%
+%% Some of the tests use files from wpt directly, namely the
+%% http-state ones. They are copied to the test/wpt/cookies directory.
+%%
+%% @todo Go over all the tests to add expire cases.
+
+-define(HOST, "web-platform.test").
+
+%% WPT: domain/domain-attribute-host-with-and-without-leading-period
+%% WPT: domain/domain-attribute-host-with-leading-period
+wpt_domain_with_and_without_leading_period_test() ->
+ URIMap = #{scheme => <<"http">>, host => <<?HOST>>, path => <<"/path/to/resource">>},
+ Store0 = gun_cookies_list:init(),
+ %% Add a cookie with a leading period in the domain. Cookie can be retrieved.
+ {ok, N0, V0, A0} = cow_cookie:parse_set_cookie(<<"a=b; Path=/; Domain=." ?HOST>>),
+ {ok, Store1} = set_cookie(Store0, URIMap, N0, V0, A0),
+ {ok, [#{value := <<"b">>}], _} = query(Store1, URIMap),
+ {ok, [#{value := <<"b">>}], _} = query(Store1, URIMap#{host => <<"sub." ?HOST>>}),
+ %% Add a cookie without a leading period in the domain. Overrides the existing cookie.
+ {ok, N1, V1, A1} = cow_cookie:parse_set_cookie(<<"a=c; Path=/; Domain=" ?HOST>>),
+ {ok, Store} = set_cookie(Store1, URIMap, N1, V1, A1),
+ {ok, [#{value := <<"c">>}], _} = query(Store, URIMap),
+ {ok, [#{value := <<"c">>}], _} = query(Store, URIMap#{host => <<"sub." ?HOST>>}),
+ ok.
+
+%% WPT: domain/domain-attribute-matches-host
+wpt_domain_matches_host_test() ->
+ URIMap = #{scheme => <<"http">>, host => <<?HOST>>, path => <<"/path/to/resource">>},
+ Store0 = gun_cookies_list:init(),
+ %% Add a cookie without a leading period in the domain. Cookie can be retrieved.
+ {ok, N1, V1, A1} = cow_cookie:parse_set_cookie(<<"a=c; Path=/; Domain=" ?HOST>>),
+ {ok, Store} = set_cookie(Store0, URIMap, N1, V1, A1),
+ {ok, [#{value := <<"c">>}], _} = query(Store, URIMap),
+ {ok, [#{value := <<"c">>}], _} = query(Store, URIMap#{host => <<"sub." ?HOST>>}),
+ ok.
+
+%% WPT: domain/domain-attribute-missing
+wpt_domain_missing_test() ->
+ URIMap = #{scheme => <<"http">>, host => <<?HOST>>, path => <<"/path/to/resource">>},
+ Store0 = gun_cookies_list:init(),
+ %% Add a cookie without a domain attribute. Cookie is not sent on subdomains.
+ {ok, N1, V1, A1} = cow_cookie:parse_set_cookie(<<"a=c; Path=/">>),
+ {ok, Store} = set_cookie(Store0, URIMap, N1, V1, A1),
+ {ok, [#{value := <<"c">>}], _} = query(Store, URIMap),
+ {ok, [], _} = query(Store, URIMap#{host => <<"sub." ?HOST>>}),
+ ok.
+
+%% WPT: http-state/general-tests
+%%
+%% The WPT http-state test suite is either broken or complicated to setup.
+%% The original http-state test suite is a better reference at the time
+%% of writing. The server running these tests is at
+%% https://github.com/abarth/http-state/blob/master/tools/testserver/testserver.py
+wpt_http_state_test_() ->
+ URIMap0 = #{scheme => <<"http">>, host => <<"home.example.org">>, path => <<"/cookie-parser">>},
+ TestFiles = filelib:wildcard("test/wpt/cookies/*-test") -- [
+ "test/wpt/cookies/attribute0023-test", %% Doesn't match the spec (path override).
+ "test/wpt/cookies/chromium0009-test", %% Doesn't match the spec (empty names).
+ "test/wpt/cookies/chromium0010-test", %% Doesn't match the spec (empty names).
+ "test/wpt/cookies/chromium0012-test", %% Doesn't match the spec (empty names).
+ "test/wpt/cookies/disabled-chromium0020-test", %% Doesn't match the spec (empty names).
+ "test/wpt/cookies/disabled-chromium0022-test", %% Nonsense.
+ "test/wpt/cookies/domain0017-test", %% This requires rejecting public suffixes.
+ "test/wpt/cookies/mozilla0012-test", %% Doesn't match the spec (empty names).
+ "test/wpt/cookies/mozilla0014-test", %% Doesn't match the spec (empty names).
+ "test/wpt/cookies/mozilla0015-test", %% Doesn't match the spec (empty names).
+ "test/wpt/cookies/mozilla0016-test", %% Doesn't match the spec (empty names).
+ "test/wpt/cookies/mozilla0017-test", %% Doesn't match the spec (empty names).
+ "test/wpt/cookies/name0017-test", %% Doesn't match the spec (empty names).
+ "test/wpt/cookies/name0023-test", %% Doesn't match the spec (empty names).
+ "test/wpt/cookies/name0025-test", %% Doesn't match the spec (empty names).
+ "test/wpt/cookies/name0028-test", %% Doesn't match the spec (empty names).
+ "test/wpt/cookies/name0031-test", %% Doesn't match the spec (name with quotes).
+ "test/wpt/cookies/name0032-test", %% Doesn't match the spec (name with quotes).
+ "test/wpt/cookies/name0033-test", %% Doesn't match the spec (empty names).
+ "test/wpt/cookies/optional-domain0042-test" %% Doesn't match the spec (empty domain override).
+ ],
+ [{F, fun() ->
+ {ok, Test} = file:read_file(F),
+ %% We don't want the final empty line.
+ Lines = lists:reverse(tl(lists:reverse(string:split(Test, <<"\n">>, all)))),
+ {Store, URIMap2} = lists:foldl(fun
+ (<<"Set-Cookie: ",SetCookie/bits>>, Acc={Store0, URIMap1}) ->
+ case cow_cookie:parse_set_cookie(SetCookie) of
+ {ok, N, V, A} ->
+ %% We use the URIMap that corresponds to the request.
+ case set_cookie(Store0, URIMap0, N, V, A) of
+ {ok, Store1} -> {Store1, URIMap1};
+ {error, _} -> Acc
+ end;
+ ignore ->
+ Acc
+ end;
+ (<<"Set-Cookie:">>, Acc) ->
+ Acc;
+ (<<"Location: ",Location/bits>>, {Store0, URIMap1}) ->
+ {Store0, maps:merge(URIMap1, uri_string:normalize(Location, [return_map]))}
+ end, {gun_cookies_list:init(), URIMap0}, Lines),
+ %% We must change the URI if it wasn't already changed by the test.
+ URIMap = case URIMap2 of
+ URIMap0 -> maps:merge(URIMap0, uri_string:normalize(<<"/cookie-parser-result">>, [return_map]));
+ _ -> URIMap2
+ end,
+ {ok, Cookies, _} = query(Store, URIMap),
+ case file:read_file(iolist_to_binary(string:replace(F, <<"-test">>, <<"-expected">>))) of
+ {ok, ExpectedFile} when ExpectedFile =:= <<>>; ExpectedFile =:= <<"\n">> ->
+ [] = Cookies,
+ ok;
+ {ok, <<"Cookie: ",CookiesBin0/bits>>} ->
+ %% We only care about the first line.
+ [CookiesBin, <<>>|_] = string:split(CookiesBin0, <<"\n">>, all),
+ ExpectedCookies = cow_cookie:parse_cookie(CookiesBin),
+ wpt_http_state_test_validate_cookies(Cookies, ExpectedCookies)
+ end
+ end} || F <- TestFiles].
+
+wpt_http_state_test_validate_cookies([], []) ->
+ ok;
+wpt_http_state_test_validate_cookies([Cookie|Tail], [{Name, Value}|ExpectedTail]) ->
+ #{name := Name, value := Value} = Cookie,
+ wpt_http_state_test_validate_cookies(Tail, ExpectedTail).
+
+%% WPT: path/default
+wpt_path_default_test() ->
+ URIMap = #{scheme => <<"http">>, host => <<?HOST>>, path => <<"/path/to/resource">>},
+ Store0 = gun_cookies_list:init(),
+ %% Add a cookie without a path attribute.
+ {ok, N1, V1, A1} = cow_cookie:parse_set_cookie(<<"cookies-path-default=1">>),
+ {ok, Store} = set_cookie(Store0, URIMap, N1, V1, A1),
+ %% Confirm the cookie was stored with the proper default path,
+ %% and gets sent for the same path, other resources at the same level or child paths.
+ {ok, [#{path := <<"/path/to">>}], _} = query(Store, URIMap),
+ {ok, [#{path := <<"/path/to">>}], _} = query(Store, URIMap#{path => <<"/path/to/other">>}),
+ {ok, [#{path := <<"/path/to">>}], _} = query(Store, URIMap#{path => <<"/path/to/resource/sub">>}),
+ %% Confirm that the cookie cannot be retrieved for parent or unrelated paths.
+ {ok, [], _} = query(Store, URIMap#{path => <<"/path">>}),
+ {ok, [], _} = query(Store, URIMap#{path => <<"/path/toon">>}),
+ {ok, [], _} = query(Store, URIMap#{path => <<"/">>}),
+ ok.
+
+%% WPT: path/match
+wpt_path_match_test_() ->
+ URIMap = #{
+ scheme => <<"http">>,
+ host => <<?HOST>>,
+ path => <<"/cookies/resources/echo-cookie.html">>
+ },
+ MatchTests = [
+ <<"/">>,
+ <<"match.html">>,
+ <<"cookies">>,
+ <<"/cookies">>,
+ <<"/cookies/">>,
+ <<"/cookies/resources/echo-cookie.html">>
+ ],
+ NegTests = [
+ <<"/cook">>,
+ <<"/w/">>
+ ],
+ [{P, fun() ->
+ {ok, N, V, A} = cow_cookie:parse_set_cookie(<<"a=b; Path=",P/binary>>),
+ {ok, Store} = set_cookie(gun_cookies_list:init(), URIMap, N, V, A),
+ {ok, [#{name := <<"a">>}], _} = query(Store, URIMap)
+ end} || P <- MatchTests]
+ ++
+ [{P, fun() ->
+ {ok, N, V, A} = cow_cookie:parse_set_cookie(<<"a=b; Path=",P/binary>>),
+ {ok, Store} = set_cookie(gun_cookies_list:init(), URIMap, N, V, A),
+ {ok, [], _} = query(Store, URIMap)
+ end} || P <- NegTests].
+
+%% WPT: prefix/__host.header
+wpt_prefix_host_test_() ->
+ Tests = [
+ {<<"http">>, <<"__Host-foo=bar; Path=/;">>, false},
+ {<<"http">>, <<"__Host-foo=bar; Path=/;domain=" ?HOST>>, false},
+ {<<"http">>, <<"__Host-foo=bar; Path=/;Max-Age=10">>, false},
+ {<<"http">>, <<"__Host-foo=bar; Path=/;HttpOnly">>, false},
+ {<<"http">>, <<"__Host-foo=bar; Secure; Path=/;">>, false},
+ {<<"http">>, <<"__Host-foo=bar; Secure; Path=/;domain=" ?HOST>>, false},
+ {<<"http">>, <<"__Host-foo=bar; Secure; Path=/;Max-Age=10">>, false},
+ {<<"http">>, <<"__Host-foo=bar; Secure; Path=/;HttpOnly">>, false},
+ {<<"http">>, <<"__Host-foo=bar; Secure; Path=/; Domain=" ?HOST "; ">>, false},
+ {<<"http">>, <<"__Host-foo=bar; Secure; Path=/; Domain=" ?HOST "; domain=" ?HOST>>, false},
+ {<<"http">>, <<"__Host-foo=bar; Secure; Path=/; Domain=" ?HOST "; Max-Age=10">>, false},
+ {<<"http">>, <<"__Host-foo=bar; Secure; Path=/; Domain=" ?HOST "; HttpOnly">>, false},
+ {<<"http">>, <<"__Host-foo=bar; Secure; Path=/cookies/resources/list.py">>, false},
+ {<<"https">>, <<"__Host-foo=bar; Path=/;">>, false},
+ {<<"https">>, <<"__Host-foo=bar; Path=/;Max-Age=10">>, false},
+ {<<"https">>, <<"__Host-foo=bar; Path=/;HttpOnly">>, false},
+ {<<"https">>, <<"__Host-foo=bar; Secure; Path=/;">>, true},
+ {<<"https">>, <<"__Host-foo=bar; Secure; Path=/;Max-Age=10">>, true},
+ {<<"https">>, <<"__Host-foo=bar; Secure; Path=/;HttpOnly">>, true},
+ {<<"https">>, <<"__Host-foo=bar; Secure; Path=/; Domain=" ?HOST "; ">>, false},
+ {<<"https">>, <<"__Host-foo=bar; Secure; Path=/; Domain=" ?HOST "; Max-Age=10">>, false},
+ {<<"https">>, <<"__Host-foo=bar; Secure; Path=/; Domain=" ?HOST "; HttpOnly">>, false},
+ {<<"https">>, <<"__Host-foo=bar; Secure; Path=/cookies/resources/list.py">>, false}
+ ],
+ wpt_prefix_common(Tests, <<"__Host-foo">>).
+
+%% WPT: prefix/__secure.header
+wpt_prefix_secure_test_() ->
+ Tests = [
+ {<<"http">>, <<"__Secure-foo=bar; Path=/;">>, false},
+ {<<"http">>, <<"__Secure-foo=bar; Path=/;domain=" ?HOST>>, false},
+ {<<"http">>, <<"__Secure-foo=bar; Path=/;Max-Age=10">>, false},
+ {<<"http">>, <<"__Secure-foo=bar; Path=/;HttpOnly">>, false},
+ {<<"http">>, <<"__Secure-foo=bar; Secure; Path=/;">>, false},
+ {<<"http">>, <<"__Secure-foo=bar; Secure; Path=/;domain=" ?HOST>>, false},
+ {<<"http">>, <<"__Secure-foo=bar; Secure; Path=/;Max-Age=10">>, false},
+ {<<"http">>, <<"__Secure-foo=bar; Secure; Path=/;HttpOnly">>, false},
+ {<<"https">>, <<"__Secure-foo=bar; Path=/;">>, false},
+ {<<"https">>, <<"__Secure-foo=bar; Path=/;Max-Age=10">>, false},
+ {<<"https">>, <<"__Secure-foo=bar; Path=/;HttpOnly">>, false},
+ {<<"https">>, <<"__Secure-foo=bar; Secure; Path=/;">>, true},
+ {<<"https">>, <<"__Secure-foo=bar; Secure; Path=/;Max-Age=10">>, true},
+ {<<"https">>, <<"__Secure-foo=bar; Secure; Path=/;HttpOnly">>, true}
+ %% @todo Missing two SameSite cases from prefix/__secure.header.https.
+ ],
+ wpt_prefix_common(Tests, <<"__Secure-foo">>).
+
+wpt_prefix_common(Tests, Name) ->
+ URIMap0 = #{
+ host => <<?HOST>>,
+ path => <<"/cookies/resources/set.py">>
+ },
+ [{<<S/binary," ",H/binary>>, fun() ->
+ URIMap1 = URIMap0#{scheme => S},
+ {ok, N, V, A} = cow_cookie:parse_set_cookie(H),
+ case set_cookie(gun_cookies_list:init(), URIMap1, N, V, A) of
+ {ok, Store} when Res =:= true ->
+ URIMap = URIMap1#{path => <<"/cookies/resources/list.py">>},
+ {ok, [#{name := Name}], _} = query(Store, URIMap),
+ ok;
+ {error, _} ->
+ ok
+ end
+ end} || {S, H, Res} <- Tests].
+
+%% @todo WPT: samesite-none-secure/
+%% @todo WPT: samesite/
+
+wpt_secure_https_test() ->
+ URIMap = #{
+ scheme => <<"https">>,
+ host => <<?HOST>>,
+ path => <<"/cookies/secure/any.html">>
+ },
+ {ok, N, V, A} = cow_cookie:parse_set_cookie(<<"secure_from_secure_http=1; Secure; Path=/">>),
+ {ok, Store} = set_cookie(gun_cookies_list:init(), URIMap, N, V, A),
+ {ok, [#{name := <<"secure_from_secure_http">>}], _} = query(Store, URIMap),
+ ok.
+
+wpt_secure_http_test() ->
+ URIMap = #{
+ scheme => <<"http">>,
+ host => <<?HOST>>,
+ path => <<"/cookies/secure/any.html">>
+ },
+ {ok, N, V, A} = cow_cookie:parse_set_cookie(<<"secure_from_nonsecure_http=1; Secure; Path=/">>),
+ {error, secure_scheme_only} = set_cookie(gun_cookies_list:init(), URIMap, N, V, A),
+ ok.
+
+%% @todo WPT: secure/set-from-ws* - Anything special required?
+-endif.
diff --git a/src/gun_cookies_list.erl b/src/gun_cookies_list.erl
new file mode 100644
index 0000000..2b4a666
--- /dev/null
+++ b/src/gun_cookies_list.erl
@@ -0,0 +1,121 @@
+%% Copyright (c) 2020, Loïc Hoguin <[email protected]>
+%%
+%% Permission to use, copy, modify, and/or distribute this software for any
+%% purpose with or without fee is hereby granted, provided that the above
+%% copyright notice and this permission notice appear in all copies.
+%%
+%% THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
+%% WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
+%% MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
+%% ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
+%% WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
+%% ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
+%% OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+
+%% A reference cookie store implemented as a list of cookies.
+%% This cookie store cannot be shared between connections.
+-module(gun_cookies_list).
+
+-export([init/0]).
+-export([query/2]).
+-export([set_cookie_secure_match/2]).
+-export([set_cookie_take_exact_match/2]).
+-export([store/2]).
+
+-type state() :: #{
+ cookies := [gun_cookies:cookie()]
+ %% @todo Options would go here.
+}.
+
+-spec init() -> {?MODULE, state()}.
+init() ->
+ {?MODULE, #{cookies => []}}.
+
+-spec query(State, uri_string:uri_map())
+ -> {ok, [{binary(), binary()}], State}
+ when State::state().
+query(State=#{cookies := Cookies}, URI) ->
+ CurrentTime = erlang:universaltime(),
+ query(State, URI, Cookies, CurrentTime, [], []).
+
+query(State, _, [], _, CookieList, Cookies) ->
+ {ok, CookieList, State#{cookies => Cookies}};
+query(State, URI=#{scheme := Scheme, host := Host, path := Path},
+ [Cookie|Tail], CurrentTime, CookieList, Acc) ->
+ %% @todo This is probably not correct, says "canonicalized request-host"
+ %% and currently doesn't include the port number, it probably should?
+ Match0 = case Cookie of
+ #{host_only := true, domain := Host} ->
+ true;
+ #{host_only := false, domain := Domain} ->
+ gun_cookies:domain_match(Host, Domain);
+ _ ->
+ false
+ end,
+ Match1 = Match0 andalso
+ gun_cookies:path_match(Path, maps:get(path, Cookie)),
+ Match = Match1 andalso
+ case {Cookie, Scheme} of
+ {#{secure_only := true}, <<"https">>} -> true;
+ {#{secure_only := false}, _} -> true;
+ _ -> false
+ end,
+ %% @todo This is where we would check the http_only flag should
+ %% we want to implement a non-HTTP interface.
+ %% @todo This is where we would check for same-site/cross-site.
+ case Match of
+ true ->
+ UpdatedCookie = Cookie#{last_access_time => CurrentTime},
+ query(State, URI, Tail, CurrentTime,
+ [UpdatedCookie|CookieList],
+ [UpdatedCookie|Acc]);
+ false ->
+ query(State, URI, Tail, CurrentTime, CookieList, [Cookie|Acc])
+ end.
+
+-spec set_cookie_secure_match(state(), #{
+ name := binary(),
+% secure_only := true,
+ domain := binary(),
+ path := binary()
+}) -> match | nomatch.
+set_cookie_secure_match(#{cookies := Cookies},
+ #{name := Name, domain := Domain, path := Path}) ->
+ Result = [Cookie || Cookie=#{name := CookieName, secure_only := true} <- Cookies,
+ CookieName =:= Name,
+ gun_cookies:domain_match(Domain, maps:get(domain, Cookie))
+ orelse gun_cookies:domain_match(maps:get(domain, Cookie), Domain),
+ gun_cookies:path_match(Path, maps:get(path, Cookie))],
+ case Result of
+ [] -> nomatch;
+ _ -> match
+ end.
+
+-spec set_cookie_take_exact_match(State, #{
+ name := binary(),
+ domain := binary(),
+ host_only := boolean(),
+ path := binary()
+}) -> {ok, gun_cookies:cookie(), State} | error when State::state().
+set_cookie_take_exact_match(State=#{cookies := Cookies0}, Match) ->
+ Result = [Cookie || Cookie <- Cookies0,
+ Match =:= maps:with([name, domain, host_only, path], Cookie)],
+ Cookies = [Cookie || Cookie <- Cookies0,
+ Match =/= maps:with([name, domain, host_only, path], Cookie)],
+ case Result of
+ [] -> error;
+ [Cookie] -> {ok, Cookie, State#{cookies => Cookies}}
+ end.
+
+-spec store(State, gun_cookies:cookie())
+ -> {ok, State} | {error, any()}
+ when State::state().
+store(State=#{cookies := Cookies}, NewCookie=#{expiry_time := ExpiryTime}) ->
+ CurrentTime = erlang:universaltime(),
+ if
+ %% Do not store cookies with an expiry time in the past.
+ ExpiryTime =/= infinity, CurrentTime >= ExpiryTime ->
+ {ok, State};
+ true ->
+ {ok, State#{cookies => [NewCookie|Cookies]}}
+ end.
diff --git a/test/wpt/cookies/0001-expected b/test/wpt/cookies/0001-expected
new file mode 100644
index 0000000..b14d4f6
--- /dev/null
+++ b/test/wpt/cookies/0001-expected
@@ -0,0 +1 @@
+Cookie: foo=bar
diff --git a/test/wpt/cookies/0001-test b/test/wpt/cookies/0001-test
new file mode 100644
index 0000000..bbeb77a
--- /dev/null
+++ b/test/wpt/cookies/0001-test
@@ -0,0 +1 @@
+Set-Cookie: foo=bar
diff --git a/test/wpt/cookies/0002-expected b/test/wpt/cookies/0002-expected
new file mode 100644
index 0000000..b14d4f6
--- /dev/null
+++ b/test/wpt/cookies/0002-expected
@@ -0,0 +1 @@
+Cookie: foo=bar
diff --git a/test/wpt/cookies/0002-test b/test/wpt/cookies/0002-test
new file mode 100644
index 0000000..94a7118
--- /dev/null
+++ b/test/wpt/cookies/0002-test
@@ -0,0 +1 @@
+Set-Cookie: foo=bar; Expires=Fri, 01 Jan 2038 00:00:00 GMT
diff --git a/test/wpt/cookies/0003-expected b/test/wpt/cookies/0003-expected
new file mode 100644
index 0000000..78e79c2
--- /dev/null
+++ b/test/wpt/cookies/0003-expected
@@ -0,0 +1 @@
+Cookie: foo2=bar2
diff --git a/test/wpt/cookies/0003-test b/test/wpt/cookies/0003-test
new file mode 100644
index 0000000..62fa172
--- /dev/null
+++ b/test/wpt/cookies/0003-test
@@ -0,0 +1,2 @@
+Set-Cookie: foo=bar; Expires=Fri, 07 Aug 2007 08:04:19 GMT
+Set-Cookie: foo2=bar2; Expires=Fri, 07 Aug 2027 08:04:19 GMT
diff --git a/test/wpt/cookies/0004-expected b/test/wpt/cookies/0004-expected
new file mode 100644
index 0000000..5ab2766
--- /dev/null
+++ b/test/wpt/cookies/0004-expected
@@ -0,0 +1 @@
+Cookie: foo
diff --git a/test/wpt/cookies/0004-test b/test/wpt/cookies/0004-test
new file mode 100644
index 0000000..190260d
--- /dev/null
+++ b/test/wpt/cookies/0004-test
@@ -0,0 +1 @@
+Set-Cookie: foo
diff --git a/test/wpt/cookies/0005-expected b/test/wpt/cookies/0005-expected
new file mode 100644
index 0000000..b14d4f6
--- /dev/null
+++ b/test/wpt/cookies/0005-expected
@@ -0,0 +1 @@
+Cookie: foo=bar
diff --git a/test/wpt/cookies/0005-test b/test/wpt/cookies/0005-test
new file mode 100644
index 0000000..4de576a
--- /dev/null
+++ b/test/wpt/cookies/0005-test
@@ -0,0 +1 @@
+Set-Cookie: foo=bar; max-age=10000;
diff --git a/test/wpt/cookies/0006-expected b/test/wpt/cookies/0006-expected
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/test/wpt/cookies/0006-expected
diff --git a/test/wpt/cookies/0006-test b/test/wpt/cookies/0006-test
new file mode 100644
index 0000000..83e41ec
--- /dev/null
+++ b/test/wpt/cookies/0006-test
@@ -0,0 +1 @@
+Set-Cookie: foo=bar; max-age=0;
diff --git a/test/wpt/cookies/0007-expected b/test/wpt/cookies/0007-expected
new file mode 100644
index 0000000..b14d4f6
--- /dev/null
+++ b/test/wpt/cookies/0007-expected
@@ -0,0 +1 @@
+Cookie: foo=bar
diff --git a/test/wpt/cookies/0007-test b/test/wpt/cookies/0007-test
new file mode 100644
index 0000000..af7b672
--- /dev/null
+++ b/test/wpt/cookies/0007-test
@@ -0,0 +1 @@
+Set-Cookie: foo=bar; version=1;
diff --git a/test/wpt/cookies/0008-expected b/test/wpt/cookies/0008-expected
new file mode 100644
index 0000000..b14d4f6
--- /dev/null
+++ b/test/wpt/cookies/0008-expected
@@ -0,0 +1 @@
+Cookie: foo=bar
diff --git a/test/wpt/cookies/0008-test b/test/wpt/cookies/0008-test
new file mode 100644
index 0000000..02baa00
--- /dev/null
+++ b/test/wpt/cookies/0008-test
@@ -0,0 +1 @@
+Set-Cookie: foo=bar; version=1000;
diff --git a/test/wpt/cookies/0009-expected b/test/wpt/cookies/0009-expected
new file mode 100644
index 0000000..b14d4f6
--- /dev/null
+++ b/test/wpt/cookies/0009-expected
@@ -0,0 +1 @@
+Cookie: foo=bar
diff --git a/test/wpt/cookies/0009-test b/test/wpt/cookies/0009-test
new file mode 100644
index 0000000..83c83fe
--- /dev/null
+++ b/test/wpt/cookies/0009-test
@@ -0,0 +1 @@
+Set-Cookie: foo=bar; customvalue=1000;
diff --git a/test/wpt/cookies/0010-expected b/test/wpt/cookies/0010-expected
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/test/wpt/cookies/0010-expected
diff --git a/test/wpt/cookies/0010-test b/test/wpt/cookies/0010-test
new file mode 100644
index 0000000..1408056
--- /dev/null
+++ b/test/wpt/cookies/0010-test
@@ -0,0 +1 @@
+Set-Cookie: foo=bar; secure;
diff --git a/test/wpt/cookies/0011-expected b/test/wpt/cookies/0011-expected
new file mode 100644
index 0000000..b14d4f6
--- /dev/null
+++ b/test/wpt/cookies/0011-expected
@@ -0,0 +1 @@
+Cookie: foo=bar
diff --git a/test/wpt/cookies/0011-test b/test/wpt/cookies/0011-test
new file mode 100644
index 0000000..ad11eab
--- /dev/null
+++ b/test/wpt/cookies/0011-test
@@ -0,0 +1 @@
+Set-Cookie: foo=bar; customvalue="1000 or more";
diff --git a/test/wpt/cookies/0012-expected b/test/wpt/cookies/0012-expected
new file mode 100644
index 0000000..b14d4f6
--- /dev/null
+++ b/test/wpt/cookies/0012-expected
@@ -0,0 +1 @@
+Cookie: foo=bar
diff --git a/test/wpt/cookies/0012-test b/test/wpt/cookies/0012-test
new file mode 100644
index 0000000..cf9e712
--- /dev/null
+++ b/test/wpt/cookies/0012-test
@@ -0,0 +1 @@
+Set-Cookie: foo=bar; customvalue="no trailing semicolon"
diff --git a/test/wpt/cookies/0013-expected b/test/wpt/cookies/0013-expected
new file mode 100644
index 0000000..266392c
--- /dev/null
+++ b/test/wpt/cookies/0013-expected
@@ -0,0 +1 @@
+Cookie: foo=qux
diff --git a/test/wpt/cookies/0013-test b/test/wpt/cookies/0013-test
new file mode 100644
index 0000000..f3c30ab
--- /dev/null
+++ b/test/wpt/cookies/0013-test
@@ -0,0 +1,2 @@
+Set-Cookie: foo=bar
+Set-Cookie: foo=qux
diff --git a/test/wpt/cookies/0014-expected b/test/wpt/cookies/0014-expected
new file mode 100644
index 0000000..4b162fe
--- /dev/null
+++ b/test/wpt/cookies/0014-expected
@@ -0,0 +1 @@
+Cookie: foo1=bar; foo2=qux
diff --git a/test/wpt/cookies/0014-test b/test/wpt/cookies/0014-test
new file mode 100644
index 0000000..6bacc67
--- /dev/null
+++ b/test/wpt/cookies/0014-test
@@ -0,0 +1,2 @@
+Set-Cookie: foo1=bar
+Set-Cookie: foo2=qux
diff --git a/test/wpt/cookies/0015-expected b/test/wpt/cookies/0015-expected
new file mode 100644
index 0000000..036ac4a
--- /dev/null
+++ b/test/wpt/cookies/0015-expected
@@ -0,0 +1 @@
+Cookie: a=b; z=y
diff --git a/test/wpt/cookies/0015-test b/test/wpt/cookies/0015-test
new file mode 100644
index 0000000..b9a3125
--- /dev/null
+++ b/test/wpt/cookies/0015-test
@@ -0,0 +1,2 @@
+Set-Cookie: a=b
+Set-Cookie: z=y
diff --git a/test/wpt/cookies/0016-expected b/test/wpt/cookies/0016-expected
new file mode 100644
index 0000000..5f1a6fd
--- /dev/null
+++ b/test/wpt/cookies/0016-expected
@@ -0,0 +1 @@
+Cookie: z=y; a=b
diff --git a/test/wpt/cookies/0016-test b/test/wpt/cookies/0016-test
new file mode 100644
index 0000000..5565928
--- /dev/null
+++ b/test/wpt/cookies/0016-test
@@ -0,0 +1,2 @@
+Set-Cookie: z=y
+Set-Cookie: a=b
diff --git a/test/wpt/cookies/0017-expected b/test/wpt/cookies/0017-expected
new file mode 100644
index 0000000..f3c269c
--- /dev/null
+++ b/test/wpt/cookies/0017-expected
@@ -0,0 +1,2 @@
+Cookie: z=y, a=b
+
diff --git a/test/wpt/cookies/0017-test b/test/wpt/cookies/0017-test
new file mode 100644
index 0000000..b8984fe
--- /dev/null
+++ b/test/wpt/cookies/0017-test
@@ -0,0 +1 @@
+Set-Cookie: z=y, a=b
diff --git a/test/wpt/cookies/0018-expected b/test/wpt/cookies/0018-expected
new file mode 100644
index 0000000..0b54935
--- /dev/null
+++ b/test/wpt/cookies/0018-expected
@@ -0,0 +1,2 @@
+Cookie: z=y
+
diff --git a/test/wpt/cookies/0018-test b/test/wpt/cookies/0018-test
new file mode 100644
index 0000000..630bf9b
--- /dev/null
+++ b/test/wpt/cookies/0018-test
@@ -0,0 +1 @@
+Set-Cookie: z=y; foo=bar, a=b
diff --git a/test/wpt/cookies/0019-expected b/test/wpt/cookies/0019-expected
new file mode 100644
index 0000000..ecc9526
--- /dev/null
+++ b/test/wpt/cookies/0019-expected
@@ -0,0 +1 @@
+Cookie: foo=b
diff --git a/test/wpt/cookies/0019-test b/test/wpt/cookies/0019-test
new file mode 100644
index 0000000..352123e
--- /dev/null
+++ b/test/wpt/cookies/0019-test
@@ -0,0 +1 @@
+Set-Cookie: foo=b;max-age=3600, c=d;path=/
diff --git a/test/wpt/cookies/0020-expected b/test/wpt/cookies/0020-expected
new file mode 100644
index 0000000..a43cb00
--- /dev/null
+++ b/test/wpt/cookies/0020-expected
@@ -0,0 +1 @@
+Cookie: a=b; c=d
diff --git a/test/wpt/cookies/0020-test b/test/wpt/cookies/0020-test
new file mode 100644
index 0000000..9b35947
--- /dev/null
+++ b/test/wpt/cookies/0020-test
@@ -0,0 +1,3 @@
+Set-Cookie: a=b
+Set-Cookie: =
+Set-Cookie: c=d
diff --git a/test/wpt/cookies/0021-expected b/test/wpt/cookies/0021-expected
new file mode 100644
index 0000000..445a592
--- /dev/null
+++ b/test/wpt/cookies/0021-expected
@@ -0,0 +1 @@
+Cookie: a=b; x; c=d
diff --git a/test/wpt/cookies/0021-test b/test/wpt/cookies/0021-test
new file mode 100644
index 0000000..5781fe3
--- /dev/null
+++ b/test/wpt/cookies/0021-test
@@ -0,0 +1,3 @@
+Set-Cookie: a=b
+Set-Cookie: =x
+Set-Cookie: c=d
diff --git a/test/wpt/cookies/0022-expected b/test/wpt/cookies/0022-expected
new file mode 100644
index 0000000..5632bec
--- /dev/null
+++ b/test/wpt/cookies/0022-expected
@@ -0,0 +1 @@
+Cookie: a=b; x=; c=d
diff --git a/test/wpt/cookies/0022-test b/test/wpt/cookies/0022-test
new file mode 100644
index 0000000..70b9abf
--- /dev/null
+++ b/test/wpt/cookies/0022-test
@@ -0,0 +1,3 @@
+Set-Cookie: a=b
+Set-Cookie: x=
+Set-Cookie: c=d
diff --git a/test/wpt/cookies/0023-expected b/test/wpt/cookies/0023-expected
new file mode 100644
index 0000000..5ab2766
--- /dev/null
+++ b/test/wpt/cookies/0023-expected
@@ -0,0 +1 @@
+Cookie: foo
diff --git a/test/wpt/cookies/0023-test b/test/wpt/cookies/0023-test
new file mode 100644
index 0000000..609c668
--- /dev/null
+++ b/test/wpt/cookies/0023-test
@@ -0,0 +1,2 @@
+Set-Cookie: foo
+Set-Cookie:
diff --git a/test/wpt/cookies/0024-expected b/test/wpt/cookies/0024-expected
new file mode 100644
index 0000000..5ab2766
--- /dev/null
+++ b/test/wpt/cookies/0024-expected
@@ -0,0 +1 @@
+Cookie: foo
diff --git a/test/wpt/cookies/0024-test b/test/wpt/cookies/0024-test
new file mode 100644
index 0000000..31dd69f
--- /dev/null
+++ b/test/wpt/cookies/0024-test
@@ -0,0 +1,2 @@
+Set-Cookie: foo
+Set-Cookie: =
diff --git a/test/wpt/cookies/0025-expected b/test/wpt/cookies/0025-expected
new file mode 100644
index 0000000..5ab2766
--- /dev/null
+++ b/test/wpt/cookies/0025-expected
@@ -0,0 +1 @@
+Cookie: foo
diff --git a/test/wpt/cookies/0025-test b/test/wpt/cookies/0025-test
new file mode 100644
index 0000000..09f51a8
--- /dev/null
+++ b/test/wpt/cookies/0025-test
@@ -0,0 +1,2 @@
+Set-Cookie: foo
+Set-Cookie: ; bar
diff --git a/test/wpt/cookies/0026-expected b/test/wpt/cookies/0026-expected
new file mode 100644
index 0000000..5ab2766
--- /dev/null
+++ b/test/wpt/cookies/0026-expected
@@ -0,0 +1 @@
+Cookie: foo
diff --git a/test/wpt/cookies/0026-test b/test/wpt/cookies/0026-test
new file mode 100644
index 0000000..5ac7274
--- /dev/null
+++ b/test/wpt/cookies/0026-test
@@ -0,0 +1,2 @@
+Set-Cookie: foo
+Set-Cookie:
diff --git a/test/wpt/cookies/0027-expected b/test/wpt/cookies/0027-expected
new file mode 100644
index 0000000..973d384
--- /dev/null
+++ b/test/wpt/cookies/0027-expected
@@ -0,0 +1 @@
+Cookie: bar
diff --git a/test/wpt/cookies/0027-test b/test/wpt/cookies/0027-test
new file mode 100644
index 0000000..f7f6d26
--- /dev/null
+++ b/test/wpt/cookies/0027-test
@@ -0,0 +1,2 @@
+Set-Cookie: foo
+Set-Cookie: bar
diff --git a/test/wpt/cookies/0028-expected b/test/wpt/cookies/0028-expected
new file mode 100644
index 0000000..5ab2766
--- /dev/null
+++ b/test/wpt/cookies/0028-expected
@@ -0,0 +1 @@
+Cookie: foo
diff --git a/test/wpt/cookies/0028-test b/test/wpt/cookies/0028-test
new file mode 100644
index 0000000..fea1e1a
--- /dev/null
+++ b/test/wpt/cookies/0028-test
@@ -0,0 +1,2 @@
+Set-Cookie: foo
+Set-Cookie:
diff --git a/test/wpt/cookies/attribute0001-expected b/test/wpt/cookies/attribute0001-expected
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/test/wpt/cookies/attribute0001-expected
diff --git a/test/wpt/cookies/attribute0001-test b/test/wpt/cookies/attribute0001-test
new file mode 100644
index 0000000..6199f78
--- /dev/null
+++ b/test/wpt/cookies/attribute0001-test
@@ -0,0 +1 @@
+Set-Cookie: foo=bar; Secure
diff --git a/test/wpt/cookies/attribute0002-expected b/test/wpt/cookies/attribute0002-expected
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/test/wpt/cookies/attribute0002-expected
diff --git a/test/wpt/cookies/attribute0002-test b/test/wpt/cookies/attribute0002-test
new file mode 100644
index 0000000..047a24d
--- /dev/null
+++ b/test/wpt/cookies/attribute0002-test
@@ -0,0 +1 @@
+Set-Cookie: foo=bar; seCURe
diff --git a/test/wpt/cookies/attribute0003-expected b/test/wpt/cookies/attribute0003-expected
new file mode 100644
index 0000000..b14d4f6
--- /dev/null
+++ b/test/wpt/cookies/attribute0003-expected
@@ -0,0 +1 @@
+Cookie: foo=bar
diff --git a/test/wpt/cookies/attribute0003-test b/test/wpt/cookies/attribute0003-test
new file mode 100644
index 0000000..c944bac
--- /dev/null
+++ b/test/wpt/cookies/attribute0003-test
@@ -0,0 +1 @@
+Set-Cookie: foo=bar; "Secure"
diff --git a/test/wpt/cookies/attribute0004-expected b/test/wpt/cookies/attribute0004-expected
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/test/wpt/cookies/attribute0004-expected
diff --git a/test/wpt/cookies/attribute0004-test b/test/wpt/cookies/attribute0004-test
new file mode 100644
index 0000000..bcfaa7d
--- /dev/null
+++ b/test/wpt/cookies/attribute0004-test
@@ -0,0 +1 @@
+Set-Cookie: foo=bar; Secure=
diff --git a/test/wpt/cookies/attribute0005-expected b/test/wpt/cookies/attribute0005-expected
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/test/wpt/cookies/attribute0005-expected
diff --git a/test/wpt/cookies/attribute0005-test b/test/wpt/cookies/attribute0005-test
new file mode 100644
index 0000000..1671087
--- /dev/null
+++ b/test/wpt/cookies/attribute0005-test
@@ -0,0 +1 @@
+Set-Cookie: foo=bar; Secure=aaaa
diff --git a/test/wpt/cookies/attribute0006-expected b/test/wpt/cookies/attribute0006-expected
new file mode 100644
index 0000000..b14d4f6
--- /dev/null
+++ b/test/wpt/cookies/attribute0006-expected
@@ -0,0 +1 @@
+Cookie: foo=bar
diff --git a/test/wpt/cookies/attribute0006-test b/test/wpt/cookies/attribute0006-test
new file mode 100644
index 0000000..39d7589
--- /dev/null
+++ b/test/wpt/cookies/attribute0006-test
@@ -0,0 +1 @@
+Set-Cookie: foo=bar; Secure qux
diff --git a/test/wpt/cookies/attribute0007-expected b/test/wpt/cookies/attribute0007-expected
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/test/wpt/cookies/attribute0007-expected
diff --git a/test/wpt/cookies/attribute0007-test b/test/wpt/cookies/attribute0007-test
new file mode 100644
index 0000000..f75f46a
--- /dev/null
+++ b/test/wpt/cookies/attribute0007-test
@@ -0,0 +1 @@
+Set-Cookie: foo=bar; Secure =aaaaa
diff --git a/test/wpt/cookies/attribute0008-expected b/test/wpt/cookies/attribute0008-expected
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/test/wpt/cookies/attribute0008-expected
diff --git a/test/wpt/cookies/attribute0008-test b/test/wpt/cookies/attribute0008-test
new file mode 100644
index 0000000..be45b3a
--- /dev/null
+++ b/test/wpt/cookies/attribute0008-test
@@ -0,0 +1 @@
+Set-Cookie: foo=bar; Secure= aaaaa
diff --git a/test/wpt/cookies/attribute0009-expected b/test/wpt/cookies/attribute0009-expected
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/test/wpt/cookies/attribute0009-expected
diff --git a/test/wpt/cookies/attribute0009-test b/test/wpt/cookies/attribute0009-test
new file mode 100644
index 0000000..1a44c22
--- /dev/null
+++ b/test/wpt/cookies/attribute0009-test
@@ -0,0 +1 @@
+Set-Cookie: foo=bar; Secure; qux
diff --git a/test/wpt/cookies/attribute0010-expected b/test/wpt/cookies/attribute0010-expected
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/test/wpt/cookies/attribute0010-expected
diff --git a/test/wpt/cookies/attribute0010-test b/test/wpt/cookies/attribute0010-test
new file mode 100644
index 0000000..ca62200
--- /dev/null
+++ b/test/wpt/cookies/attribute0010-test
@@ -0,0 +1 @@
+Set-Cookie: foo=bar; Secure;qux
diff --git a/test/wpt/cookies/attribute0011-expected b/test/wpt/cookies/attribute0011-expected
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/test/wpt/cookies/attribute0011-expected
diff --git a/test/wpt/cookies/attribute0011-test b/test/wpt/cookies/attribute0011-test
new file mode 100644
index 0000000..3bd4c2e
--- /dev/null
+++ b/test/wpt/cookies/attribute0011-test
@@ -0,0 +1 @@
+Set-Cookie: foo=bar; Secure ; qux
diff --git a/test/wpt/cookies/attribute0012-expected b/test/wpt/cookies/attribute0012-expected
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/test/wpt/cookies/attribute0012-expected
diff --git a/test/wpt/cookies/attribute0012-test b/test/wpt/cookies/attribute0012-test
new file mode 100644
index 0000000..6e7b816
--- /dev/null
+++ b/test/wpt/cookies/attribute0012-test
@@ -0,0 +1 @@
+Set-Cookie: foo=bar; Secure
diff --git a/test/wpt/cookies/attribute0013-expected b/test/wpt/cookies/attribute0013-expected
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/test/wpt/cookies/attribute0013-expected
diff --git a/test/wpt/cookies/attribute0013-test b/test/wpt/cookies/attribute0013-test
new file mode 100644
index 0000000..f4814e4
--- /dev/null
+++ b/test/wpt/cookies/attribute0013-test
@@ -0,0 +1 @@
+Set-Cookie: foo=bar; Secure ;
diff --git a/test/wpt/cookies/attribute0014-expected b/test/wpt/cookies/attribute0014-expected
new file mode 100644
index 0000000..b14d4f6
--- /dev/null
+++ b/test/wpt/cookies/attribute0014-expected
@@ -0,0 +1 @@
+Cookie: foo=bar
diff --git a/test/wpt/cookies/attribute0014-test b/test/wpt/cookies/attribute0014-test
new file mode 100644
index 0000000..ef88896
--- /dev/null
+++ b/test/wpt/cookies/attribute0014-test
@@ -0,0 +1 @@
+Set-Cookie: foo=bar; Path
diff --git a/test/wpt/cookies/attribute0015-expected b/test/wpt/cookies/attribute0015-expected
new file mode 100644
index 0000000..b14d4f6
--- /dev/null
+++ b/test/wpt/cookies/attribute0015-expected
@@ -0,0 +1 @@
+Cookie: foo=bar
diff --git a/test/wpt/cookies/attribute0015-test b/test/wpt/cookies/attribute0015-test
new file mode 100644
index 0000000..cea7060
--- /dev/null
+++ b/test/wpt/cookies/attribute0015-test
@@ -0,0 +1 @@
+Set-Cookie: foo=bar; Path=
diff --git a/test/wpt/cookies/attribute0016-expected b/test/wpt/cookies/attribute0016-expected
new file mode 100644
index 0000000..b14d4f6
--- /dev/null
+++ b/test/wpt/cookies/attribute0016-expected
@@ -0,0 +1 @@
+Cookie: foo=bar
diff --git a/test/wpt/cookies/attribute0016-test b/test/wpt/cookies/attribute0016-test
new file mode 100644
index 0000000..9a5b591
--- /dev/null
+++ b/test/wpt/cookies/attribute0016-test
@@ -0,0 +1 @@
+Set-Cookie: foo=bar; Path=/
diff --git a/test/wpt/cookies/attribute0017-expected b/test/wpt/cookies/attribute0017-expected
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/test/wpt/cookies/attribute0017-expected
diff --git a/test/wpt/cookies/attribute0017-test b/test/wpt/cookies/attribute0017-test
new file mode 100644
index 0000000..a6aeeb3
--- /dev/null
+++ b/test/wpt/cookies/attribute0017-test
@@ -0,0 +1 @@
+Set-Cookie: foo=bar; Path=/qux
diff --git a/test/wpt/cookies/attribute0018-expected b/test/wpt/cookies/attribute0018-expected
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/test/wpt/cookies/attribute0018-expected
diff --git a/test/wpt/cookies/attribute0018-test b/test/wpt/cookies/attribute0018-test
new file mode 100644
index 0000000..f912201
--- /dev/null
+++ b/test/wpt/cookies/attribute0018-test
@@ -0,0 +1 @@
+Set-Cookie: foo=bar; Path =/qux
diff --git a/test/wpt/cookies/attribute0019-expected b/test/wpt/cookies/attribute0019-expected
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/test/wpt/cookies/attribute0019-expected
diff --git a/test/wpt/cookies/attribute0019-test b/test/wpt/cookies/attribute0019-test
new file mode 100644
index 0000000..a424c6e
--- /dev/null
+++ b/test/wpt/cookies/attribute0019-test
@@ -0,0 +1 @@
+Set-Cookie: foo=bar; Path= /qux
diff --git a/test/wpt/cookies/attribute0020-expected b/test/wpt/cookies/attribute0020-expected
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/test/wpt/cookies/attribute0020-expected
diff --git a/test/wpt/cookies/attribute0020-test b/test/wpt/cookies/attribute0020-test
new file mode 100644
index 0000000..367d2a1
--- /dev/null
+++ b/test/wpt/cookies/attribute0020-test
@@ -0,0 +1 @@
+Set-Cookie: foo=bar; Path=/qux ; taz
diff --git a/test/wpt/cookies/attribute0021-expected b/test/wpt/cookies/attribute0021-expected
new file mode 100644
index 0000000..b14d4f6
--- /dev/null
+++ b/test/wpt/cookies/attribute0021-expected
@@ -0,0 +1 @@
+Cookie: foo=bar
diff --git a/test/wpt/cookies/attribute0021-test b/test/wpt/cookies/attribute0021-test
new file mode 100644
index 0000000..bb76deb
--- /dev/null
+++ b/test/wpt/cookies/attribute0021-test
@@ -0,0 +1 @@
+Set-Cookie: foo=bar; Path=/qux; Path=/
diff --git a/test/wpt/cookies/attribute0022-expected b/test/wpt/cookies/attribute0022-expected
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/test/wpt/cookies/attribute0022-expected
diff --git a/test/wpt/cookies/attribute0022-test b/test/wpt/cookies/attribute0022-test
new file mode 100644
index 0000000..ac79c0f
--- /dev/null
+++ b/test/wpt/cookies/attribute0022-test
@@ -0,0 +1 @@
+Set-Cookie: foo=bar; Path=/; Path=/qux
diff --git a/test/wpt/cookies/attribute0023-expected b/test/wpt/cookies/attribute0023-expected
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/test/wpt/cookies/attribute0023-expected
diff --git a/test/wpt/cookies/attribute0023-test b/test/wpt/cookies/attribute0023-test
new file mode 100644
index 0000000..97f2ac3
--- /dev/null
+++ b/test/wpt/cookies/attribute0023-test
@@ -0,0 +1 @@
+Set-Cookie: foo=bar; Path=/qux; Path=/cookie-parser-result
diff --git a/test/wpt/cookies/attribute0024-expected b/test/wpt/cookies/attribute0024-expected
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/test/wpt/cookies/attribute0024-expected
diff --git a/test/wpt/cookies/attribute0024-test b/test/wpt/cookies/attribute0024-test
new file mode 100644
index 0000000..cb041c5
--- /dev/null
+++ b/test/wpt/cookies/attribute0024-test
@@ -0,0 +1 @@
+Set-Cookie: foo=bar; Path=/cookie-parser-result; Path=/qux
diff --git a/test/wpt/cookies/attribute0025-expected b/test/wpt/cookies/attribute0025-expected
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/test/wpt/cookies/attribute0025-expected
diff --git a/test/wpt/cookies/attribute0025-test b/test/wpt/cookies/attribute0025-test
new file mode 100644
index 0000000..c430943
--- /dev/null
+++ b/test/wpt/cookies/attribute0025-test
@@ -0,0 +1 @@
+Set-Cookie: foo=bar; qux; Secure
diff --git a/test/wpt/cookies/attribute0026-expected b/test/wpt/cookies/attribute0026-expected
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/test/wpt/cookies/attribute0026-expected
diff --git a/test/wpt/cookies/attribute0026-test b/test/wpt/cookies/attribute0026-test
new file mode 100644
index 0000000..7f68322
--- /dev/null
+++ b/test/wpt/cookies/attribute0026-test
@@ -0,0 +1 @@
+Set-Cookie: foo=bar; qux="aaa;bbb"; Secure
diff --git a/test/wpt/cookies/charset0001-expected b/test/wpt/cookies/charset0001-expected
new file mode 100644
index 0000000..8646afc
--- /dev/null
+++ b/test/wpt/cookies/charset0001-expected
@@ -0,0 +1 @@
+Cookie: foo=春节回家路·春运完全手册
diff --git a/test/wpt/cookies/charset0001-test b/test/wpt/cookies/charset0001-test
new file mode 100644
index 0000000..e89a36d
--- /dev/null
+++ b/test/wpt/cookies/charset0001-test
@@ -0,0 +1 @@
+Set-Cookie: foo=春节回家路·春运完全手册
diff --git a/test/wpt/cookies/charset0002-expected b/test/wpt/cookies/charset0002-expected
new file mode 100644
index 0000000..fc7d256
--- /dev/null
+++ b/test/wpt/cookies/charset0002-expected
@@ -0,0 +1 @@
+Cookie: 春节回=家路·春运完全手册
diff --git a/test/wpt/cookies/charset0002-test b/test/wpt/cookies/charset0002-test
new file mode 100644
index 0000000..70ce472
--- /dev/null
+++ b/test/wpt/cookies/charset0002-test
@@ -0,0 +1 @@
+Set-Cookie: 春节回=家路·春运完全手册
diff --git a/test/wpt/cookies/charset0003-expected b/test/wpt/cookies/charset0003-expected
new file mode 100644
index 0000000..1969bc8
--- /dev/null
+++ b/test/wpt/cookies/charset0003-expected
@@ -0,0 +1 @@
+Cookie: 春节回=家路·春运
diff --git a/test/wpt/cookies/charset0003-test b/test/wpt/cookies/charset0003-test
new file mode 100644
index 0000000..446e2fd
--- /dev/null
+++ b/test/wpt/cookies/charset0003-test
@@ -0,0 +1 @@
+Set-Cookie: 春节回=家路·春运; 完全手册
diff --git a/test/wpt/cookies/charset0004-expected b/test/wpt/cookies/charset0004-expected
new file mode 100644
index 0000000..1d6d952
--- /dev/null
+++ b/test/wpt/cookies/charset0004-expected
@@ -0,0 +1 @@
+Cookie: foo="春节回家路·春运完全手册"
diff --git a/test/wpt/cookies/charset0004-test b/test/wpt/cookies/charset0004-test
new file mode 100644
index 0000000..1564ba4
--- /dev/null
+++ b/test/wpt/cookies/charset0004-test
@@ -0,0 +1 @@
+Set-Cookie: foo="春节回家路·春运完全手册"
diff --git a/test/wpt/cookies/chromium0001-expected b/test/wpt/cookies/chromium0001-expected
new file mode 100644
index 0000000..1022f64
--- /dev/null
+++ b/test/wpt/cookies/chromium0001-expected
@@ -0,0 +1 @@
+Cookie: a=b
diff --git a/test/wpt/cookies/chromium0001-test b/test/wpt/cookies/chromium0001-test
new file mode 100644
index 0000000..4635f0e
--- /dev/null
+++ b/test/wpt/cookies/chromium0001-test
@@ -0,0 +1 @@
+Set-Cookie: a=b
diff --git a/test/wpt/cookies/chromium0002-expected b/test/wpt/cookies/chromium0002-expected
new file mode 100644
index 0000000..64932dc
--- /dev/null
+++ b/test/wpt/cookies/chromium0002-expected
@@ -0,0 +1 @@
+Cookie: aBc="zzz "
diff --git a/test/wpt/cookies/chromium0002-test b/test/wpt/cookies/chromium0002-test
new file mode 100644
index 0000000..24ab0d2
--- /dev/null
+++ b/test/wpt/cookies/chromium0002-test
@@ -0,0 +1 @@
+Set-Cookie: aBc="zzz " ;
diff --git a/test/wpt/cookies/chromium0003-expected b/test/wpt/cookies/chromium0003-expected
new file mode 100644
index 0000000..64932dc
--- /dev/null
+++ b/test/wpt/cookies/chromium0003-expected
@@ -0,0 +1 @@
+Cookie: aBc="zzz "
diff --git a/test/wpt/cookies/chromium0003-test b/test/wpt/cookies/chromium0003-test
new file mode 100644
index 0000000..bac41f9
--- /dev/null
+++ b/test/wpt/cookies/chromium0003-test
@@ -0,0 +1 @@
+Set-Cookie: aBc="zzz " ;
diff --git a/test/wpt/cookies/chromium0004-expected b/test/wpt/cookies/chromium0004-expected
new file mode 100644
index 0000000..9be3e8f
--- /dev/null
+++ b/test/wpt/cookies/chromium0004-expected
@@ -0,0 +1 @@
+Cookie: aBc="zz
diff --git a/test/wpt/cookies/chromium0004-test b/test/wpt/cookies/chromium0004-test
new file mode 100644
index 0000000..45cab2f
--- /dev/null
+++ b/test/wpt/cookies/chromium0004-test
@@ -0,0 +1 @@
+Set-Cookie: aBc="zz;pp" ; ;
diff --git a/test/wpt/cookies/chromium0005-expected b/test/wpt/cookies/chromium0005-expected
new file mode 100644
index 0000000..9be3e8f
--- /dev/null
+++ b/test/wpt/cookies/chromium0005-expected
@@ -0,0 +1 @@
+Cookie: aBc="zz
diff --git a/test/wpt/cookies/chromium0005-test b/test/wpt/cookies/chromium0005-test
new file mode 100644
index 0000000..c2dfebd
--- /dev/null
+++ b/test/wpt/cookies/chromium0005-test
@@ -0,0 +1 @@
+Set-Cookie: aBc="zz ;
diff --git a/test/wpt/cookies/chromium0006-expected b/test/wpt/cookies/chromium0006-expected
new file mode 100644
index 0000000..8121145
--- /dev/null
+++ b/test/wpt/cookies/chromium0006-expected
@@ -0,0 +1 @@
+Cookie: aBc="zzz " "ppp"
diff --git a/test/wpt/cookies/chromium0006-test b/test/wpt/cookies/chromium0006-test
new file mode 100644
index 0000000..a9da268
--- /dev/null
+++ b/test/wpt/cookies/chromium0006-test
@@ -0,0 +1 @@
+Set-Cookie: aBc="zzz " "ppp" ;
diff --git a/test/wpt/cookies/chromium0007-expected b/test/wpt/cookies/chromium0007-expected
new file mode 100644
index 0000000..8121145
--- /dev/null
+++ b/test/wpt/cookies/chromium0007-expected
@@ -0,0 +1 @@
+Cookie: aBc="zzz " "ppp"
diff --git a/test/wpt/cookies/chromium0007-test b/test/wpt/cookies/chromium0007-test
new file mode 100644
index 0000000..dca20b8
--- /dev/null
+++ b/test/wpt/cookies/chromium0007-test
@@ -0,0 +1 @@
+Set-Cookie: aBc="zzz " "ppp" ;
diff --git a/test/wpt/cookies/chromium0008-expected b/test/wpt/cookies/chromium0008-expected
new file mode 100644
index 0000000..602c0e0
--- /dev/null
+++ b/test/wpt/cookies/chromium0008-expected
@@ -0,0 +1 @@
+Cookie: aBc=A"B
diff --git a/test/wpt/cookies/chromium0008-test b/test/wpt/cookies/chromium0008-test
new file mode 100644
index 0000000..ece6c66
--- /dev/null
+++ b/test/wpt/cookies/chromium0008-test
@@ -0,0 +1 @@
+Set-Cookie: aBc=A"B ;
diff --git a/test/wpt/cookies/chromium0009-expected b/test/wpt/cookies/chromium0009-expected
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/test/wpt/cookies/chromium0009-expected
diff --git a/test/wpt/cookies/chromium0009-test b/test/wpt/cookies/chromium0009-test
new file mode 100644
index 0000000..eecdae6
--- /dev/null
+++ b/test/wpt/cookies/chromium0009-test
@@ -0,0 +1 @@
+Set-Cookie: BLAHHH; path=/;
diff --git a/test/wpt/cookies/chromium0010-expected b/test/wpt/cookies/chromium0010-expected
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/test/wpt/cookies/chromium0010-expected
diff --git a/test/wpt/cookies/chromium0010-test b/test/wpt/cookies/chromium0010-test
new file mode 100644
index 0000000..17a18ea
--- /dev/null
+++ b/test/wpt/cookies/chromium0010-test
@@ -0,0 +1 @@
+Set-Cookie: "BLA\"HHH"; path=/;
diff --git a/test/wpt/cookies/chromium0011-expected b/test/wpt/cookies/chromium0011-expected
new file mode 100644
index 0000000..2062e23
--- /dev/null
+++ b/test/wpt/cookies/chromium0011-expected
@@ -0,0 +1 @@
+Cookie: a="B
diff --git a/test/wpt/cookies/chromium0011-test b/test/wpt/cookies/chromium0011-test
new file mode 100644
index 0000000..4000f26
--- /dev/null
+++ b/test/wpt/cookies/chromium0011-test
@@ -0,0 +1 @@
+Set-Cookie: a="B
diff --git a/test/wpt/cookies/chromium0012-expected b/test/wpt/cookies/chromium0012-expected
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/test/wpt/cookies/chromium0012-expected
diff --git a/test/wpt/cookies/chromium0012-test b/test/wpt/cookies/chromium0012-test
new file mode 100644
index 0000000..b33a4e7
--- /dev/null
+++ b/test/wpt/cookies/chromium0012-test
@@ -0,0 +1 @@
+Set-Cookie: =ABC
diff --git a/test/wpt/cookies/chromium0013-expected b/test/wpt/cookies/chromium0013-expected
new file mode 100644
index 0000000..5d2d060
--- /dev/null
+++ b/test/wpt/cookies/chromium0013-expected
@@ -0,0 +1 @@
+Cookie: ABC=
diff --git a/test/wpt/cookies/chromium0013-test b/test/wpt/cookies/chromium0013-test
new file mode 100644
index 0000000..f61a087
--- /dev/null
+++ b/test/wpt/cookies/chromium0013-test
@@ -0,0 +1 @@
+Set-Cookie: ABC=; path = /
diff --git a/test/wpt/cookies/chromium0014-expected b/test/wpt/cookies/chromium0014-expected
new file mode 100644
index 0000000..21bfd13
--- /dev/null
+++ b/test/wpt/cookies/chromium0014-expected
@@ -0,0 +1 @@
+Cookie: A=BC
diff --git a/test/wpt/cookies/chromium0014-test b/test/wpt/cookies/chromium0014-test
new file mode 100644
index 0000000..edbb793
--- /dev/null
+++ b/test/wpt/cookies/chromium0014-test
@@ -0,0 +1 @@
+Set-Cookie: A = BC ;foo;;; bar
diff --git a/test/wpt/cookies/chromium0015-expected b/test/wpt/cookies/chromium0015-expected
new file mode 100644
index 0000000..b968e74
--- /dev/null
+++ b/test/wpt/cookies/chromium0015-expected
@@ -0,0 +1 @@
+Cookie: A=== BC
diff --git a/test/wpt/cookies/chromium0015-test b/test/wpt/cookies/chromium0015-test
new file mode 100644
index 0000000..80d3236
--- /dev/null
+++ b/test/wpt/cookies/chromium0015-test
@@ -0,0 +1 @@
+Set-Cookie: A=== BC ;foo;;; bar
diff --git a/test/wpt/cookies/chromium0016-expected b/test/wpt/cookies/chromium0016-expected
new file mode 100644
index 0000000..11d8efa
--- /dev/null
+++ b/test/wpt/cookies/chromium0016-expected
@@ -0,0 +1 @@
+Cookie: foo="zohNumRKgI0oxyhSsV3Z7D"
diff --git a/test/wpt/cookies/chromium0016-test b/test/wpt/cookies/chromium0016-test
new file mode 100644
index 0000000..8abf120
--- /dev/null
+++ b/test/wpt/cookies/chromium0016-test
@@ -0,0 +1 @@
+Set-Cookie: foo="zohNumRKgI0oxyhSsV3Z7D" ; expires=Sun, 18-Apr-2027 21:06:29 GMT ; path=/ ;
diff --git a/test/wpt/cookies/chromium0017-expected b/test/wpt/cookies/chromium0017-expected
new file mode 100644
index 0000000..6bb8448
--- /dev/null
+++ b/test/wpt/cookies/chromium0017-expected
@@ -0,0 +1 @@
+Cookie: foo=zohNumRKgI0oxyhSsV3Z7D
diff --git a/test/wpt/cookies/chromium0017-test b/test/wpt/cookies/chromium0017-test
new file mode 100644
index 0000000..94cce02
--- /dev/null
+++ b/test/wpt/cookies/chromium0017-test
@@ -0,0 +1 @@
+Set-Cookie: foo=zohNumRKgI0oxyhSsV3Z7D ; expires=Sun, 18-Apr-2027 21:06:29 GMT ; path=/ ;
diff --git a/test/wpt/cookies/chromium0018-expected b/test/wpt/cookies/chromium0018-expected
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/test/wpt/cookies/chromium0018-expected
diff --git a/test/wpt/cookies/chromium0018-test b/test/wpt/cookies/chromium0018-test
new file mode 100644
index 0000000..145ad2c
--- /dev/null
+++ b/test/wpt/cookies/chromium0018-test
@@ -0,0 +1 @@
+Set-Cookie:
diff --git a/test/wpt/cookies/chromium0019-expected b/test/wpt/cookies/chromium0019-expected
new file mode 100644
index 0000000..b6df50e
--- /dev/null
+++ b/test/wpt/cookies/chromium0019-expected
@@ -0,0 +1 @@
+Cookie: a=aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa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aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
diff --git a/test/wpt/cookies/chromium0021-expected b/test/wpt/cookies/chromium0021-expected
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/test/wpt/cookies/chromium0021-expected
diff --git a/test/wpt/cookies/chromium0021-test b/test/wpt/cookies/chromium0021-test
new file mode 100644
index 0000000..145ad2c
--- /dev/null
+++ b/test/wpt/cookies/chromium0021-test
@@ -0,0 +1 @@
+Set-Cookie:
diff --git a/test/wpt/cookies/comma0001-expected b/test/wpt/cookies/comma0001-expected
new file mode 100644
index 0000000..ab55cea
--- /dev/null
+++ b/test/wpt/cookies/comma0001-expected
@@ -0,0 +1 @@
+Cookie: foo=bar, baz=qux
diff --git a/test/wpt/cookies/comma0001-test b/test/wpt/cookies/comma0001-test
new file mode 100644
index 0000000..5b3678d
--- /dev/null
+++ b/test/wpt/cookies/comma0001-test
@@ -0,0 +1 @@
+Set-Cookie: foo=bar, baz=qux
diff --git a/test/wpt/cookies/comma0002-expected b/test/wpt/cookies/comma0002-expected
new file mode 100644
index 0000000..33590a0
--- /dev/null
+++ b/test/wpt/cookies/comma0002-expected
@@ -0,0 +1 @@
+Cookie: foo="bar, baz=qux"
diff --git a/test/wpt/cookies/comma0002-test b/test/wpt/cookies/comma0002-test
new file mode 100644
index 0000000..164c0a9
--- /dev/null
+++ b/test/wpt/cookies/comma0002-test
@@ -0,0 +1 @@
+Set-Cookie: foo="bar, baz=qux"
diff --git a/test/wpt/cookies/comma0003-expected b/test/wpt/cookies/comma0003-expected
new file mode 100644
index 0000000..b14d4f6
--- /dev/null
+++ b/test/wpt/cookies/comma0003-expected
@@ -0,0 +1 @@
+Cookie: foo=bar
diff --git a/test/wpt/cookies/comma0003-test b/test/wpt/cookies/comma0003-test
new file mode 100644
index 0000000..213d3a5
--- /dev/null
+++ b/test/wpt/cookies/comma0003-test
@@ -0,0 +1 @@
+Set-Cookie: foo=bar; b,az=qux
diff --git a/test/wpt/cookies/comma0004-expected b/test/wpt/cookies/comma0004-expected
new file mode 100644
index 0000000..b14d4f6
--- /dev/null
+++ b/test/wpt/cookies/comma0004-expected
@@ -0,0 +1 @@
+Cookie: foo=bar
diff --git a/test/wpt/cookies/comma0004-test b/test/wpt/cookies/comma0004-test
new file mode 100644
index 0000000..e93f6f4
--- /dev/null
+++ b/test/wpt/cookies/comma0004-test
@@ -0,0 +1 @@
+Set-Cookie: foo=bar; baz=q,ux
diff --git a/test/wpt/cookies/comma0005-expected b/test/wpt/cookies/comma0005-expected
new file mode 100644
index 0000000..b14d4f6
--- /dev/null
+++ b/test/wpt/cookies/comma0005-expected
@@ -0,0 +1 @@
+Cookie: foo=bar
diff --git a/test/wpt/cookies/comma0005-test b/test/wpt/cookies/comma0005-test
new file mode 100644
index 0000000..eeb040d
--- /dev/null
+++ b/test/wpt/cookies/comma0005-test
@@ -0,0 +1 @@
+Set-Cookie: foo=bar; Max-Age=50,399
diff --git a/test/wpt/cookies/comma0006-expected b/test/wpt/cookies/comma0006-expected
new file mode 100644
index 0000000..b14d4f6
--- /dev/null
+++ b/test/wpt/cookies/comma0006-expected
@@ -0,0 +1 @@
+Cookie: foo=bar
diff --git a/test/wpt/cookies/comma0006-test b/test/wpt/cookies/comma0006-test
new file mode 100644
index 0000000..94a7118
--- /dev/null
+++ b/test/wpt/cookies/comma0006-test
@@ -0,0 +1 @@
+Set-Cookie: foo=bar; Expires=Fri, 01 Jan 2038 00:00:00 GMT
diff --git a/test/wpt/cookies/comma0007-expected b/test/wpt/cookies/comma0007-expected
new file mode 100644
index 0000000..b14d4f6
--- /dev/null
+++ b/test/wpt/cookies/comma0007-expected
@@ -0,0 +1 @@
+Cookie: foo=bar
diff --git a/test/wpt/cookies/comma0007-test b/test/wpt/cookies/comma0007-test
new file mode 100644
index 0000000..6ca8efc
--- /dev/null
+++ b/test/wpt/cookies/comma0007-test
@@ -0,0 +1 @@
+Set-Cookie: foo=bar; Expires=Fri 01 Jan 2038 00:00:00 GMT, baz=qux
diff --git a/test/wpt/cookies/disabled-chromium0020-expected b/test/wpt/cookies/disabled-chromium0020-expected
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/test/wpt/cookies/disabled-chromium0020-expected
diff --git a/test/wpt/cookies/disabled-chromium0020-test b/test/wpt/cookies/disabled-chromium0020-test
new file mode 100644
index 0000000..67cefa3
--- /dev/null
+++ b/test/wpt/cookies/disabled-chromium0020-test
@@ -0,0 +1 @@
+Set-Cookie: aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa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aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
diff --git a/test/wpt/cookies/disabled-chromium0022-expected b/test/wpt/cookies/disabled-chromium0022-expected
new file mode 100644
index 0000000..8ac1321
--- /dev/null
+++ b/test/wpt/cookies/disabled-chromium0022-expected
@@ -0,0 +1 @@
+Cookie: AAA=BB
diff --git a/test/wpt/cookies/disabled-chromium0022-test b/test/wpt/cookies/disabled-chromium0022-test
new file mode 100644
index 0000000..76a8ed4
--- /dev/null
+++ b/test/wpt/cookies/disabled-chromium0022-test
@@ -0,0 +1 @@
+Set-Cookie: AAA=BB ZYX
diff --git a/test/wpt/cookies/disabled-path0029-expected b/test/wpt/cookies/disabled-path0029-expected
new file mode 100644
index 0000000..b14d4f6
--- /dev/null
+++ b/test/wpt/cookies/disabled-path0029-expected
@@ -0,0 +1 @@
+Cookie: foo=bar
diff --git a/test/wpt/cookies/disabled-path0029-test b/test/wpt/cookies/disabled-path0029-test
new file mode 100644
index 0000000..d7219d5
--- /dev/null
+++ b/test/wpt/cookies/disabled-path0029-test
@@ -0,0 +1,2 @@
+Set-Cookie: foo=bar; path=/cookie-parser-result/foo/bar
+Location: /cookie-parser-result/f%6Fo/bar?disabled-path0029
diff --git a/test/wpt/cookies/domain0001-expected b/test/wpt/cookies/domain0001-expected
new file mode 100644
index 0000000..b14d4f6
--- /dev/null
+++ b/test/wpt/cookies/domain0001-expected
@@ -0,0 +1 @@
+Cookie: foo=bar
diff --git a/test/wpt/cookies/domain0001-test b/test/wpt/cookies/domain0001-test
new file mode 100644
index 0000000..fd8926d
--- /dev/null
+++ b/test/wpt/cookies/domain0001-test
@@ -0,0 +1,2 @@
+Set-Cookie: foo=bar; domain=home.example.org
+Location: http://home.example.org:8888/cookie-parser-result?domain0001
diff --git a/test/wpt/cookies/domain0002-expected b/test/wpt/cookies/domain0002-expected
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/test/wpt/cookies/domain0002-expected
diff --git a/test/wpt/cookies/domain0002-test b/test/wpt/cookies/domain0002-test
new file mode 100644
index 0000000..a6ad2a8
--- /dev/null
+++ b/test/wpt/cookies/domain0002-test
@@ -0,0 +1,2 @@
+Set-Cookie: foo=bar; domain=home.example.org
+Location: http://sibling.example.org:8888/cookie-parser-result?domain0002
diff --git a/test/wpt/cookies/domain0003-expected b/test/wpt/cookies/domain0003-expected
new file mode 100644
index 0000000..b14d4f6
--- /dev/null
+++ b/test/wpt/cookies/domain0003-expected
@@ -0,0 +1 @@
+Cookie: foo=bar
diff --git a/test/wpt/cookies/domain0003-test b/test/wpt/cookies/domain0003-test
new file mode 100644
index 0000000..ff051f4
--- /dev/null
+++ b/test/wpt/cookies/domain0003-test
@@ -0,0 +1,2 @@
+Set-Cookie: foo=bar; domain=.home.example.org
+Location: http://home.example.org:8888/cookie-parser-result?domain0003
diff --git a/test/wpt/cookies/domain0004-expected b/test/wpt/cookies/domain0004-expected
new file mode 100644
index 0000000..b14d4f6
--- /dev/null
+++ b/test/wpt/cookies/domain0004-expected
@@ -0,0 +1 @@
+Cookie: foo=bar
diff --git a/test/wpt/cookies/domain0004-test b/test/wpt/cookies/domain0004-test
new file mode 100644
index 0000000..f05029b
--- /dev/null
+++ b/test/wpt/cookies/domain0004-test
@@ -0,0 +1,2 @@
+Set-Cookie: foo=bar; domain=home.example.org
+Location: http://subdomain.home.example.org:8888/cookie-parser-result?domain0004
diff --git a/test/wpt/cookies/domain0005-expected b/test/wpt/cookies/domain0005-expected
new file mode 100644
index 0000000..b14d4f6
--- /dev/null
+++ b/test/wpt/cookies/domain0005-expected
@@ -0,0 +1 @@
+Cookie: foo=bar
diff --git a/test/wpt/cookies/domain0005-test b/test/wpt/cookies/domain0005-test
new file mode 100644
index 0000000..697ab18
--- /dev/null
+++ b/test/wpt/cookies/domain0005-test
@@ -0,0 +1,2 @@
+Set-Cookie: foo=bar; domain=.home.example.org
+Location: http://subdomain.home.example.org:8888/cookie-parser-result?domain0005
diff --git a/test/wpt/cookies/domain0006-expected b/test/wpt/cookies/domain0006-expected
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/test/wpt/cookies/domain0006-expected
diff --git a/test/wpt/cookies/domain0006-test b/test/wpt/cookies/domain0006-test
new file mode 100644
index 0000000..fe5f90d
--- /dev/null
+++ b/test/wpt/cookies/domain0006-test
@@ -0,0 +1,2 @@
+Set-Cookie: foo=bar; domain=.home.example.org
+Location: http://sibling.example.org:8888/cookie-parser-result?domain0006
diff --git a/test/wpt/cookies/domain0007-expected b/test/wpt/cookies/domain0007-expected
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/test/wpt/cookies/domain0007-expected
diff --git a/test/wpt/cookies/domain0007-test b/test/wpt/cookies/domain0007-test
new file mode 100644
index 0000000..1d2c6fc
--- /dev/null
+++ b/test/wpt/cookies/domain0007-test
@@ -0,0 +1,2 @@
+Set-Cookie: foo=bar; domain=sibling.example.org
+Location: http://sibling.example.org:8888/cookie-parser-result?domain0007
diff --git a/test/wpt/cookies/domain0008-expected b/test/wpt/cookies/domain0008-expected
new file mode 100644
index 0000000..b14d4f6
--- /dev/null
+++ b/test/wpt/cookies/domain0008-expected
@@ -0,0 +1 @@
+Cookie: foo=bar
diff --git a/test/wpt/cookies/domain0008-test b/test/wpt/cookies/domain0008-test
new file mode 100644
index 0000000..491c52d
--- /dev/null
+++ b/test/wpt/cookies/domain0008-test
@@ -0,0 +1,2 @@
+Set-Cookie: foo=bar; domain=.example.org
+Location: http://home.example.org:8888/cookie-parser-result?domain0008
diff --git a/test/wpt/cookies/domain0009-expected b/test/wpt/cookies/domain0009-expected
new file mode 100644
index 0000000..b14d4f6
--- /dev/null
+++ b/test/wpt/cookies/domain0009-expected
@@ -0,0 +1 @@
+Cookie: foo=bar
diff --git a/test/wpt/cookies/domain0009-test b/test/wpt/cookies/domain0009-test
new file mode 100644
index 0000000..736e69f
--- /dev/null
+++ b/test/wpt/cookies/domain0009-test
@@ -0,0 +1,2 @@
+Set-Cookie: foo=bar; domain=example.org
+Location: http://home.example.org:8888/cookie-parser-result?domain0009
diff --git a/test/wpt/cookies/domain0010-expected b/test/wpt/cookies/domain0010-expected
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/test/wpt/cookies/domain0010-expected
diff --git a/test/wpt/cookies/domain0010-test b/test/wpt/cookies/domain0010-test
new file mode 100644
index 0000000..5bf212f
--- /dev/null
+++ b/test/wpt/cookies/domain0010-test
@@ -0,0 +1,2 @@
+Set-Cookie: foo=bar; domain=..home.example.org
+Location: http://home.example.org:8888/cookie-parser-result?domain0010
diff --git a/test/wpt/cookies/domain0011-expected b/test/wpt/cookies/domain0011-expected
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/test/wpt/cookies/domain0011-expected
diff --git a/test/wpt/cookies/domain0011-test b/test/wpt/cookies/domain0011-test
new file mode 100644
index 0000000..e1c54db
--- /dev/null
+++ b/test/wpt/cookies/domain0011-test
@@ -0,0 +1,2 @@
+Set-Cookie: foo=bar; domain=home..example.org
+Location: http://home.example.org:8888/cookie-parser-result?domain0011
diff --git a/test/wpt/cookies/domain0012-expected b/test/wpt/cookies/domain0012-expected
new file mode 100644
index 0000000..b14d4f6
--- /dev/null
+++ b/test/wpt/cookies/domain0012-expected
@@ -0,0 +1 @@
+Cookie: foo=bar
diff --git a/test/wpt/cookies/domain0012-test b/test/wpt/cookies/domain0012-test
new file mode 100644
index 0000000..a189f38
--- /dev/null
+++ b/test/wpt/cookies/domain0012-test
@@ -0,0 +1,2 @@
+Set-Cookie: foo=bar; domain= .home.example.org
+Location: http://home.example.org:8888/cookie-parser-result?domain0012
diff --git a/test/wpt/cookies/domain0013-expected b/test/wpt/cookies/domain0013-expected
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/test/wpt/cookies/domain0013-expected
diff --git a/test/wpt/cookies/domain0013-test b/test/wpt/cookies/domain0013-test
new file mode 100644
index 0000000..8493146
--- /dev/null
+++ b/test/wpt/cookies/domain0013-test
@@ -0,0 +1,2 @@
+Set-Cookie: foo=bar; domain= . home.example.org
+Location: http://home.example.org:8888/cookie-parser-result?domain0013
diff --git a/test/wpt/cookies/domain0014-expected b/test/wpt/cookies/domain0014-expected
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/test/wpt/cookies/domain0014-expected
diff --git a/test/wpt/cookies/domain0014-test b/test/wpt/cookies/domain0014-test
new file mode 100644
index 0000000..adccd0d
--- /dev/null
+++ b/test/wpt/cookies/domain0014-test
@@ -0,0 +1,2 @@
+Set-Cookie: foo=bar; domain=home.example.org.
+Location: http://home.example.org:8888/cookie-parser-result?domain0014
diff --git a/test/wpt/cookies/domain0015-expected b/test/wpt/cookies/domain0015-expected
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/test/wpt/cookies/domain0015-expected
diff --git a/test/wpt/cookies/domain0015-test b/test/wpt/cookies/domain0015-test
new file mode 100644
index 0000000..c123ba9
--- /dev/null
+++ b/test/wpt/cookies/domain0015-test
@@ -0,0 +1,2 @@
+Set-Cookie: foo=bar; domain=home.example.org..
+Location: http://home.example.org:8888/cookie-parser-result?domain0015
diff --git a/test/wpt/cookies/domain0016-expected b/test/wpt/cookies/domain0016-expected
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/test/wpt/cookies/domain0016-expected
diff --git a/test/wpt/cookies/domain0016-test b/test/wpt/cookies/domain0016-test
new file mode 100644
index 0000000..9136ac4
--- /dev/null
+++ b/test/wpt/cookies/domain0016-test
@@ -0,0 +1,2 @@
+Set-Cookie: foo=bar; domain=home.example.org .
+Location: http://home.example.org:8888/cookie-parser-result?domain0016
diff --git a/test/wpt/cookies/domain0017-expected b/test/wpt/cookies/domain0017-expected
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/test/wpt/cookies/domain0017-expected
diff --git a/test/wpt/cookies/domain0017-test b/test/wpt/cookies/domain0017-test
new file mode 100644
index 0000000..8e876b8
--- /dev/null
+++ b/test/wpt/cookies/domain0017-test
@@ -0,0 +1,2 @@
+Set-Cookie: foo=bar; domain=.org
+Location: http://home.example.org:8888/cookie-parser-result?domain0017
diff --git a/test/wpt/cookies/domain0018-expected b/test/wpt/cookies/domain0018-expected
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/test/wpt/cookies/domain0018-expected
diff --git a/test/wpt/cookies/domain0018-test b/test/wpt/cookies/domain0018-test
new file mode 100644
index 0000000..3763f96
--- /dev/null
+++ b/test/wpt/cookies/domain0018-test
@@ -0,0 +1,2 @@
+Set-Cookie: foo=bar; domain=.org.
+Location: http://home.example.org:8888/cookie-parser-result?domain0018
diff --git a/test/wpt/cookies/domain0019-expected b/test/wpt/cookies/domain0019-expected
new file mode 100644
index 0000000..1f359c4
--- /dev/null
+++ b/test/wpt/cookies/domain0019-expected
@@ -0,0 +1 @@
+Cookie: foo=bar; foo2=bar2
diff --git a/test/wpt/cookies/domain0019-test b/test/wpt/cookies/domain0019-test
new file mode 100644
index 0000000..f5aebfd
--- /dev/null
+++ b/test/wpt/cookies/domain0019-test
@@ -0,0 +1,3 @@
+Set-Cookie: foo=bar; domain=home.example.org
+Set-Cookie: foo2=bar2; domain=.home.example.org
+Location: http://home.example.org:8888/cookie-parser-result?domain0019
diff --git a/test/wpt/cookies/domain0020-expected b/test/wpt/cookies/domain0020-expected
new file mode 100644
index 0000000..5eb3ac4
--- /dev/null
+++ b/test/wpt/cookies/domain0020-expected
@@ -0,0 +1 @@
+Cookie: foo2=bar2; foo=bar
diff --git a/test/wpt/cookies/domain0020-test b/test/wpt/cookies/domain0020-test
new file mode 100644
index 0000000..1c7a61c
--- /dev/null
+++ b/test/wpt/cookies/domain0020-test
@@ -0,0 +1,3 @@
+Set-Cookie: foo2=bar2; domain=.home.example.org
+Set-Cookie: foo=bar; domain=home.example.org
+Location: http://home.example.org:8888/cookie-parser-result?domain0020
diff --git a/test/wpt/cookies/domain0021-expected b/test/wpt/cookies/domain0021-expected
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/test/wpt/cookies/domain0021-expected
diff --git a/test/wpt/cookies/domain0021-test b/test/wpt/cookies/domain0021-test
new file mode 100644
index 0000000..895744e
--- /dev/null
+++ b/test/wpt/cookies/domain0021-test
@@ -0,0 +1,2 @@
+Set-Cookie: foo=bar; domain="home.example.org"
+Location: http://home.example.org:8888/cookie-parser-result?domain0021
diff --git a/test/wpt/cookies/domain0022-expected b/test/wpt/cookies/domain0022-expected
new file mode 100644
index 0000000..1f359c4
--- /dev/null
+++ b/test/wpt/cookies/domain0022-expected
@@ -0,0 +1 @@
+Cookie: foo=bar; foo2=bar2
diff --git a/test/wpt/cookies/domain0022-test b/test/wpt/cookies/domain0022-test
new file mode 100644
index 0000000..6eeae00
--- /dev/null
+++ b/test/wpt/cookies/domain0022-test
@@ -0,0 +1,3 @@
+Set-Cookie: foo=bar; domain=home.example.org
+Set-Cookie: foo2=bar2; domain=.example.org
+Location: http://home.example.org:8888/cookie-parser-result?domain0022
diff --git a/test/wpt/cookies/domain0023-expected b/test/wpt/cookies/domain0023-expected
new file mode 100644
index 0000000..5eb3ac4
--- /dev/null
+++ b/test/wpt/cookies/domain0023-expected
@@ -0,0 +1 @@
+Cookie: foo2=bar2; foo=bar
diff --git a/test/wpt/cookies/domain0023-test b/test/wpt/cookies/domain0023-test
new file mode 100644
index 0000000..91a81ed
--- /dev/null
+++ b/test/wpt/cookies/domain0023-test
@@ -0,0 +1,3 @@
+Set-Cookie: foo2=bar2; domain=.example.org
+Set-Cookie: foo=bar; domain=home.example.org
+Location: http://home.example.org:8888/cookie-parser-result?domain0023
diff --git a/test/wpt/cookies/domain0024-expected b/test/wpt/cookies/domain0024-expected
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/test/wpt/cookies/domain0024-expected
diff --git a/test/wpt/cookies/domain0024-test b/test/wpt/cookies/domain0024-test
new file mode 100644
index 0000000..63157b9
--- /dev/null
+++ b/test/wpt/cookies/domain0024-test
@@ -0,0 +1,2 @@
+Set-Cookie: foo=bar; domain=.example.org; domain=home.example.org
+Location: http://sibling.example.org:8888/cookie-parser-result?domain0024
diff --git a/test/wpt/cookies/domain0025-expected b/test/wpt/cookies/domain0025-expected
new file mode 100644
index 0000000..b14d4f6
--- /dev/null
+++ b/test/wpt/cookies/domain0025-expected
@@ -0,0 +1 @@
+Cookie: foo=bar
diff --git a/test/wpt/cookies/domain0025-test b/test/wpt/cookies/domain0025-test
new file mode 100644
index 0000000..353c3bb
--- /dev/null
+++ b/test/wpt/cookies/domain0025-test
@@ -0,0 +1,2 @@
+Set-Cookie: foo=bar; domain=home.example.org; domain=.example.org
+Location: http://sibling.example.org:8888/cookie-parser-result?domain0025
diff --git a/test/wpt/cookies/domain0026-expected b/test/wpt/cookies/domain0026-expected
new file mode 100644
index 0000000..b14d4f6
--- /dev/null
+++ b/test/wpt/cookies/domain0026-expected
@@ -0,0 +1 @@
+Cookie: foo=bar
diff --git a/test/wpt/cookies/domain0026-test b/test/wpt/cookies/domain0026-test
new file mode 100644
index 0000000..3b14e30
--- /dev/null
+++ b/test/wpt/cookies/domain0026-test
@@ -0,0 +1,2 @@
+Set-Cookie: foo=bar; domain=home.eXaMpLe.org
+Location: http://home.example.org:8888/cookie-parser-result?domain0026
diff --git a/test/wpt/cookies/domain0027-expected b/test/wpt/cookies/domain0027-expected
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/test/wpt/cookies/domain0027-expected
diff --git a/test/wpt/cookies/domain0027-test b/test/wpt/cookies/domain0027-test
new file mode 100644
index 0000000..8b7adbd
--- /dev/null
+++ b/test/wpt/cookies/domain0027-test
@@ -0,0 +1,2 @@
+Set-Cookie: foo=bar; domain=home.example.org:8888
+Location: http://home.example.org:8888/cookie-parser-result?domain0027
diff --git a/test/wpt/cookies/domain0028-expected b/test/wpt/cookies/domain0028-expected
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/test/wpt/cookies/domain0028-expected
diff --git a/test/wpt/cookies/domain0028-test b/test/wpt/cookies/domain0028-test
new file mode 100644
index 0000000..ab8f2c4
--- /dev/null
+++ b/test/wpt/cookies/domain0028-test
@@ -0,0 +1,2 @@
+Set-Cookie: foo=bar; domain=subdomain.home.example.org
+Location: http://subdomain.home.example.org:8888/cookie-parser-result?domain0028
diff --git a/test/wpt/cookies/domain0029-expected b/test/wpt/cookies/domain0029-expected
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/test/wpt/cookies/domain0029-expected
diff --git a/test/wpt/cookies/domain0029-test b/test/wpt/cookies/domain0029-test
new file mode 100644
index 0000000..cfab57a
--- /dev/null
+++ b/test/wpt/cookies/domain0029-test
@@ -0,0 +1,2 @@
+Set-Cookie: foo=bar
+Location: http://subdomain.home.example.org:8888/cookie-parser-result?domain0029
diff --git a/test/wpt/cookies/domain0031-expected b/test/wpt/cookies/domain0031-expected
new file mode 100644
index 0000000..b14d4f6
--- /dev/null
+++ b/test/wpt/cookies/domain0031-expected
@@ -0,0 +1 @@
+Cookie: foo=bar
diff --git a/test/wpt/cookies/domain0031-test b/test/wpt/cookies/domain0031-test
new file mode 100644
index 0000000..6eccb78
--- /dev/null
+++ b/test/wpt/cookies/domain0031-test
@@ -0,0 +1,2 @@
+Set-Cookie: foo=bar; domain=home.example.org; domain=.example.org
+Location: http://sibling.example.org:8888/cookie-parser-result?domain0031
diff --git a/test/wpt/cookies/domain0033-expected b/test/wpt/cookies/domain0033-expected
new file mode 100644
index 0000000..b14d4f6
--- /dev/null
+++ b/test/wpt/cookies/domain0033-expected
@@ -0,0 +1 @@
+Cookie: foo=bar
diff --git a/test/wpt/cookies/domain0033-test b/test/wpt/cookies/domain0033-test
new file mode 100644
index 0000000..7fdcc83
--- /dev/null
+++ b/test/wpt/cookies/domain0033-test
@@ -0,0 +1,2 @@
+Set-Cookie: foo=bar; domain=home.example.org
+Location: http://hoMe.eXaMplE.org:8888/cookie-parser-result?domain0033
diff --git a/test/wpt/cookies/domain0034-expected b/test/wpt/cookies/domain0034-expected
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/test/wpt/cookies/domain0034-expected
diff --git a/test/wpt/cookies/domain0034-test b/test/wpt/cookies/domain0034-test
new file mode 100644
index 0000000..d3f4723
--- /dev/null
+++ b/test/wpt/cookies/domain0034-test
@@ -0,0 +1,2 @@
+Set-Cookie: foo=bar; domain=home.example.org; domain=home.example.com
+Location: http://home.example.org:8888/cookie-parser-result?domain0034
diff --git a/test/wpt/cookies/domain0035-expected b/test/wpt/cookies/domain0035-expected
new file mode 100644
index 0000000..b14d4f6
--- /dev/null
+++ b/test/wpt/cookies/domain0035-expected
@@ -0,0 +1 @@
+Cookie: foo=bar
diff --git a/test/wpt/cookies/domain0035-test b/test/wpt/cookies/domain0035-test
new file mode 100644
index 0000000..967d248
--- /dev/null
+++ b/test/wpt/cookies/domain0035-test
@@ -0,0 +1,2 @@
+Set-Cookie: foo=bar; domain=home.example.com; domain=home.example.org
+Location: http://home.example.org:8888/cookie-parser-result?domain0035
diff --git a/test/wpt/cookies/domain0036-expected b/test/wpt/cookies/domain0036-expected
new file mode 100644
index 0000000..b14d4f6
--- /dev/null
+++ b/test/wpt/cookies/domain0036-expected
@@ -0,0 +1 @@
+Cookie: foo=bar
diff --git a/test/wpt/cookies/domain0036-test b/test/wpt/cookies/domain0036-test
new file mode 100644
index 0000000..a618ec4
--- /dev/null
+++ b/test/wpt/cookies/domain0036-test
@@ -0,0 +1,2 @@
+Set-Cookie: foo=bar; domain=home.example.org; domain=home.example.com; domain=home.example.org
+Location: http://home.example.org:8888/cookie-parser-result?domain0036
diff --git a/test/wpt/cookies/domain0037-expected b/test/wpt/cookies/domain0037-expected
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/test/wpt/cookies/domain0037-expected
diff --git a/test/wpt/cookies/domain0037-test b/test/wpt/cookies/domain0037-test
new file mode 100644
index 0000000..c61fe8f
--- /dev/null
+++ b/test/wpt/cookies/domain0037-test
@@ -0,0 +1,2 @@
+Set-Cookie: foo=bar; domain=home.example.com; domain=home.example.org; domain=home.example.com
+Location: http://home.example.org:8888/cookie-parser-result?domain0037
diff --git a/test/wpt/cookies/domain0038-expected b/test/wpt/cookies/domain0038-expected
new file mode 100644
index 0000000..b14d4f6
--- /dev/null
+++ b/test/wpt/cookies/domain0038-expected
@@ -0,0 +1 @@
+Cookie: foo=bar
diff --git a/test/wpt/cookies/domain0038-test b/test/wpt/cookies/domain0038-test
new file mode 100644
index 0000000..2d8fcca
--- /dev/null
+++ b/test/wpt/cookies/domain0038-test
@@ -0,0 +1,2 @@
+Set-Cookie: foo=bar; domain=home.example.org; domain=home.example.org
+Location: http://home.example.org:8888/cookie-parser-result?domain0038
diff --git a/test/wpt/cookies/domain0039-expected b/test/wpt/cookies/domain0039-expected
new file mode 100644
index 0000000..b14d4f6
--- /dev/null
+++ b/test/wpt/cookies/domain0039-expected
@@ -0,0 +1 @@
+Cookie: foo=bar
diff --git a/test/wpt/cookies/domain0039-test b/test/wpt/cookies/domain0039-test
new file mode 100644
index 0000000..3225b28
--- /dev/null
+++ b/test/wpt/cookies/domain0039-test
@@ -0,0 +1,2 @@
+Set-Cookie: foo=bar; domain=home.example.org; domain=example.org
+Location: http://home.example.org:8888/cookie-parser-result?domain0039
diff --git a/test/wpt/cookies/domain0040-expected b/test/wpt/cookies/domain0040-expected
new file mode 100644
index 0000000..b14d4f6
--- /dev/null
+++ b/test/wpt/cookies/domain0040-expected
@@ -0,0 +1 @@
+Cookie: foo=bar
diff --git a/test/wpt/cookies/domain0040-test b/test/wpt/cookies/domain0040-test
new file mode 100644
index 0000000..3e32fa8
--- /dev/null
+++ b/test/wpt/cookies/domain0040-test
@@ -0,0 +1,2 @@
+Set-Cookie: foo=bar; domain=example.org; domain=home.example.org
+Location: http://home.example.org:8888/cookie-parser-result?domain0040
diff --git a/test/wpt/cookies/domain0041-expected b/test/wpt/cookies/domain0041-expected
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/test/wpt/cookies/domain0041-expected
diff --git a/test/wpt/cookies/domain0041-test b/test/wpt/cookies/domain0041-test
new file mode 100644
index 0000000..6fbc4ad
--- /dev/null
+++ b/test/wpt/cookies/domain0041-test
@@ -0,0 +1,2 @@
+Set-Cookie: foo=bar; domain=.sibling.example.org
+Location: http://sibling.example.org:8888/cookie-parser-result?domain0041
diff --git a/test/wpt/cookies/domain0042-expected b/test/wpt/cookies/domain0042-expected
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/test/wpt/cookies/domain0042-expected
diff --git a/test/wpt/cookies/domain0042-test b/test/wpt/cookies/domain0042-test
new file mode 100644
index 0000000..9258624
--- /dev/null
+++ b/test/wpt/cookies/domain0042-test
@@ -0,0 +1,2 @@
+Set-Cookie: foo=bar; domain=.sibling.home.example.org
+Location: http://sibling.home.example.org:8888/cookie-parser-result?domain0042
diff --git a/test/wpt/cookies/mozilla0001-expected b/test/wpt/cookies/mozilla0001-expected
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/test/wpt/cookies/mozilla0001-expected
diff --git a/test/wpt/cookies/mozilla0001-test b/test/wpt/cookies/mozilla0001-test
new file mode 100644
index 0000000..53f98e2
--- /dev/null
+++ b/test/wpt/cookies/mozilla0001-test
@@ -0,0 +1 @@
+Set-Cookie: foo=bar; max-age=-1
diff --git a/test/wpt/cookies/mozilla0002-expected b/test/wpt/cookies/mozilla0002-expected
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/test/wpt/cookies/mozilla0002-expected
diff --git a/test/wpt/cookies/mozilla0002-test b/test/wpt/cookies/mozilla0002-test
new file mode 100644
index 0000000..a79c5be
--- /dev/null
+++ b/test/wpt/cookies/mozilla0002-test
@@ -0,0 +1 @@
+Set-Cookie: foo=bar; max-age=0
diff --git a/test/wpt/cookies/mozilla0003-expected b/test/wpt/cookies/mozilla0003-expected
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/test/wpt/cookies/mozilla0003-expected
diff --git a/test/wpt/cookies/mozilla0003-test b/test/wpt/cookies/mozilla0003-test
new file mode 100644
index 0000000..785c326
--- /dev/null
+++ b/test/wpt/cookies/mozilla0003-test
@@ -0,0 +1 @@
+Set-Cookie: foo=bar; expires=Thu, 10 Apr 1980 16:33:12 GMT
diff --git a/test/wpt/cookies/mozilla0004-expected b/test/wpt/cookies/mozilla0004-expected
new file mode 100644
index 0000000..b14d4f6
--- /dev/null
+++ b/test/wpt/cookies/mozilla0004-expected
@@ -0,0 +1 @@
+Cookie: foo=bar
diff --git a/test/wpt/cookies/mozilla0004-test b/test/wpt/cookies/mozilla0004-test
new file mode 100644
index 0000000..567134f
--- /dev/null
+++ b/test/wpt/cookies/mozilla0004-test
@@ -0,0 +1 @@
+Set-Cookie: foo=bar; max-age=60
diff --git a/test/wpt/cookies/mozilla0005-expected b/test/wpt/cookies/mozilla0005-expected
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/test/wpt/cookies/mozilla0005-expected
diff --git a/test/wpt/cookies/mozilla0005-test b/test/wpt/cookies/mozilla0005-test
new file mode 100644
index 0000000..0fa350a
--- /dev/null
+++ b/test/wpt/cookies/mozilla0005-test
@@ -0,0 +1 @@
+Set-Cookie: foo=bar; max-age=-20
diff --git a/test/wpt/cookies/mozilla0006-expected b/test/wpt/cookies/mozilla0006-expected
new file mode 100644
index 0000000..b14d4f6
--- /dev/null
+++ b/test/wpt/cookies/mozilla0006-expected
@@ -0,0 +1 @@
+Cookie: foo=bar
diff --git a/test/wpt/cookies/mozilla0006-test b/test/wpt/cookies/mozilla0006-test
new file mode 100644
index 0000000..567134f
--- /dev/null
+++ b/test/wpt/cookies/mozilla0006-test
@@ -0,0 +1 @@
+Set-Cookie: foo=bar; max-age=60
diff --git a/test/wpt/cookies/mozilla0007-expected b/test/wpt/cookies/mozilla0007-expected
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/test/wpt/cookies/mozilla0007-expected
diff --git a/test/wpt/cookies/mozilla0007-test b/test/wpt/cookies/mozilla0007-test
new file mode 100644
index 0000000..785c326
--- /dev/null
+++ b/test/wpt/cookies/mozilla0007-test
@@ -0,0 +1 @@
+Set-Cookie: foo=bar; expires=Thu, 10 Apr 1980 16:33:12 GMT
diff --git a/test/wpt/cookies/mozilla0008-expected b/test/wpt/cookies/mozilla0008-expected
new file mode 100644
index 0000000..0f62bab
--- /dev/null
+++ b/test/wpt/cookies/mozilla0008-expected
@@ -0,0 +1 @@
+Cookie: foo=bar; foo1=bar
diff --git a/test/wpt/cookies/mozilla0008-test b/test/wpt/cookies/mozilla0008-test
new file mode 100644
index 0000000..d6350d6
--- /dev/null
+++ b/test/wpt/cookies/mozilla0008-test
@@ -0,0 +1,2 @@
+Set-Cookie: foo=bar; max-age=60
+Set-Cookie: foo1=bar; max-age=60
diff --git a/test/wpt/cookies/mozilla0009-expected b/test/wpt/cookies/mozilla0009-expected
new file mode 100644
index 0000000..555fbaf
--- /dev/null
+++ b/test/wpt/cookies/mozilla0009-expected
@@ -0,0 +1 @@
+Cookie: foo1=bar
diff --git a/test/wpt/cookies/mozilla0009-test b/test/wpt/cookies/mozilla0009-test
new file mode 100644
index 0000000..84944d4
--- /dev/null
+++ b/test/wpt/cookies/mozilla0009-test
@@ -0,0 +1,3 @@
+Set-Cookie: foo=bar; max-age=60
+Set-Cookie: foo1=bar; max-age=60
+Set-Cookie: foo=differentvalue; max-age=0
diff --git a/test/wpt/cookies/mozilla0010-expected b/test/wpt/cookies/mozilla0010-expected
new file mode 100644
index 0000000..555fbaf
--- /dev/null
+++ b/test/wpt/cookies/mozilla0010-expected
@@ -0,0 +1 @@
+Cookie: foo1=bar
diff --git a/test/wpt/cookies/mozilla0010-test b/test/wpt/cookies/mozilla0010-test
new file mode 100644
index 0000000..13477a4
--- /dev/null
+++ b/test/wpt/cookies/mozilla0010-test
@@ -0,0 +1,4 @@
+Set-Cookie: foo=bar; max-age=60
+Set-Cookie: foo1=bar; max-age=60
+Set-Cookie: foo=differentvalue; max-age=0
+Set-Cookie: foo2=evendifferentvalue; max-age=0
diff --git a/test/wpt/cookies/mozilla0011-expected b/test/wpt/cookies/mozilla0011-expected
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/test/wpt/cookies/mozilla0011-expected
diff --git a/test/wpt/cookies/mozilla0011-test b/test/wpt/cookies/mozilla0011-test
new file mode 100644
index 0000000..bba2053
--- /dev/null
+++ b/test/wpt/cookies/mozilla0011-test
@@ -0,0 +1 @@
+Set-Cookie: test=parser; domain=.parser.test; ;; ;=; ,,, ===,abc,=; abracadabra! max-age=20;=;;
diff --git a/test/wpt/cookies/mozilla0012-expected b/test/wpt/cookies/mozilla0012-expected
new file mode 100644
index 0000000..10e669a
--- /dev/null
+++ b/test/wpt/cookies/mozilla0012-expected
@@ -0,0 +1 @@
+Cookie: test="fubar! = foo
diff --git a/test/wpt/cookies/mozilla0012-test b/test/wpt/cookies/mozilla0012-test
new file mode 100644
index 0000000..9ba773f
--- /dev/null
+++ b/test/wpt/cookies/mozilla0012-test
@@ -0,0 +1,2 @@
+Set-Cookie: test="fubar! = foo;bar\";" parser; max-age=6
+Set-Cookie: five; max-age=2.63,
diff --git a/test/wpt/cookies/mozilla0013-expected b/test/wpt/cookies/mozilla0013-expected
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/test/wpt/cookies/mozilla0013-expected
diff --git a/test/wpt/cookies/mozilla0013-test b/test/wpt/cookies/mozilla0013-test
new file mode 100644
index 0000000..d491267
--- /dev/null
+++ b/test/wpt/cookies/mozilla0013-test
@@ -0,0 +1,2 @@
+Set-Cookie: test=kill; max-age=0
+Set-Cookie: five; max-age=0
diff --git a/test/wpt/cookies/mozilla0014-expected b/test/wpt/cookies/mozilla0014-expected
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/test/wpt/cookies/mozilla0014-expected
diff --git a/test/wpt/cookies/mozilla0014-test b/test/wpt/cookies/mozilla0014-test
new file mode 100644
index 0000000..4cc1f45
--- /dev/null
+++ b/test/wpt/cookies/mozilla0014-test
@@ -0,0 +1 @@
+Set-Cookie: six
diff --git a/test/wpt/cookies/mozilla0015-expected b/test/wpt/cookies/mozilla0015-expected
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/test/wpt/cookies/mozilla0015-expected
diff --git a/test/wpt/cookies/mozilla0015-test b/test/wpt/cookies/mozilla0015-test
new file mode 100644
index 0000000..13254db
--- /dev/null
+++ b/test/wpt/cookies/mozilla0015-test
@@ -0,0 +1,2 @@
+Set-Cookie: six
+Set-Cookie: seven
diff --git a/test/wpt/cookies/mozilla0016-expected b/test/wpt/cookies/mozilla0016-expected
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/test/wpt/cookies/mozilla0016-expected
diff --git a/test/wpt/cookies/mozilla0016-test b/test/wpt/cookies/mozilla0016-test
new file mode 100644
index 0000000..6aab3e8
--- /dev/null
+++ b/test/wpt/cookies/mozilla0016-test
@@ -0,0 +1,3 @@
+Set-Cookie: six
+Set-Cookie: seven
+Set-Cookie: =eight
diff --git a/test/wpt/cookies/mozilla0017-expected b/test/wpt/cookies/mozilla0017-expected
new file mode 100644
index 0000000..fc9a249
--- /dev/null
+++ b/test/wpt/cookies/mozilla0017-expected
@@ -0,0 +1 @@
+Cookie: test=six
diff --git a/test/wpt/cookies/mozilla0017-test b/test/wpt/cookies/mozilla0017-test
new file mode 100644
index 0000000..b6c297c
--- /dev/null
+++ b/test/wpt/cookies/mozilla0017-test
@@ -0,0 +1,4 @@
+Set-Cookie: six
+Set-Cookie: seven
+Set-Cookie: =eight
+Set-Cookie: test=six
diff --git a/test/wpt/cookies/name0001-expected b/test/wpt/cookies/name0001-expected
new file mode 100644
index 0000000..9652792
--- /dev/null
+++ b/test/wpt/cookies/name0001-expected
@@ -0,0 +1 @@
+Cookie: a=bar
diff --git a/test/wpt/cookies/name0001-test b/test/wpt/cookies/name0001-test
new file mode 100644
index 0000000..3ce5f5f
--- /dev/null
+++ b/test/wpt/cookies/name0001-test
@@ -0,0 +1 @@
+Set-Cookie: a=bar
diff --git a/test/wpt/cookies/name0002-expected b/test/wpt/cookies/name0002-expected
new file mode 100644
index 0000000..d4d3cda
--- /dev/null
+++ b/test/wpt/cookies/name0002-expected
@@ -0,0 +1 @@
+Cookie: 1=bar
diff --git a/test/wpt/cookies/name0002-test b/test/wpt/cookies/name0002-test
new file mode 100644
index 0000000..d6eac8a
--- /dev/null
+++ b/test/wpt/cookies/name0002-test
@@ -0,0 +1 @@
+Set-Cookie: 1=bar
diff --git a/test/wpt/cookies/name0003-expected b/test/wpt/cookies/name0003-expected
new file mode 100644
index 0000000..0c00f45
--- /dev/null
+++ b/test/wpt/cookies/name0003-expected
@@ -0,0 +1 @@
+Cookie: $=bar
diff --git a/test/wpt/cookies/name0003-test b/test/wpt/cookies/name0003-test
new file mode 100644
index 0000000..7ea9615
--- /dev/null
+++ b/test/wpt/cookies/name0003-test
@@ -0,0 +1 @@
+Set-Cookie: $=bar
diff --git a/test/wpt/cookies/name0004-expected b/test/wpt/cookies/name0004-expected
new file mode 100644
index 0000000..b079529
--- /dev/null
+++ b/test/wpt/cookies/name0004-expected
@@ -0,0 +1 @@
+Cookie: !a=bar
diff --git a/test/wpt/cookies/name0004-test b/test/wpt/cookies/name0004-test
new file mode 100644
index 0000000..99f0e61
--- /dev/null
+++ b/test/wpt/cookies/name0004-test
@@ -0,0 +1 @@
+Set-Cookie: !a=bar
diff --git a/test/wpt/cookies/name0005-expected b/test/wpt/cookies/name0005-expected
new file mode 100644
index 0000000..a0f031b
--- /dev/null
+++ b/test/wpt/cookies/name0005-expected
@@ -0,0 +1 @@
+Cookie: @a=bar
diff --git a/test/wpt/cookies/name0005-test b/test/wpt/cookies/name0005-test
new file mode 100644
index 0000000..9e33e0c
--- /dev/null
+++ b/test/wpt/cookies/name0005-test
@@ -0,0 +1 @@
+Set-Cookie: @a=bar
diff --git a/test/wpt/cookies/name0006-expected b/test/wpt/cookies/name0006-expected
new file mode 100644
index 0000000..ee0e7d7
--- /dev/null
+++ b/test/wpt/cookies/name0006-expected
@@ -0,0 +1 @@
+Cookie: #a=bar
diff --git a/test/wpt/cookies/name0006-test b/test/wpt/cookies/name0006-test
new file mode 100644
index 0000000..fbd0363
--- /dev/null
+++ b/test/wpt/cookies/name0006-test
@@ -0,0 +1 @@
+Set-Cookie: #a=bar
diff --git a/test/wpt/cookies/name0007-expected b/test/wpt/cookies/name0007-expected
new file mode 100644
index 0000000..6d6e56e
--- /dev/null
+++ b/test/wpt/cookies/name0007-expected
@@ -0,0 +1 @@
+Cookie: $a=bar
diff --git a/test/wpt/cookies/name0007-test b/test/wpt/cookies/name0007-test
new file mode 100644
index 0000000..d41e64b
--- /dev/null
+++ b/test/wpt/cookies/name0007-test
@@ -0,0 +1 @@
+Set-Cookie: $a=bar
diff --git a/test/wpt/cookies/name0008-expected b/test/wpt/cookies/name0008-expected
new file mode 100644
index 0000000..a4b8c24
--- /dev/null
+++ b/test/wpt/cookies/name0008-expected
@@ -0,0 +1 @@
+Cookie: %a=bar
diff --git a/test/wpt/cookies/name0008-test b/test/wpt/cookies/name0008-test
new file mode 100644
index 0000000..7afcf70
--- /dev/null
+++ b/test/wpt/cookies/name0008-test
@@ -0,0 +1 @@
+Set-Cookie: %a=bar
diff --git a/test/wpt/cookies/name0009-expected b/test/wpt/cookies/name0009-expected
new file mode 100644
index 0000000..49506ac
--- /dev/null
+++ b/test/wpt/cookies/name0009-expected
@@ -0,0 +1 @@
+Cookie: ^a=bar
diff --git a/test/wpt/cookies/name0009-test b/test/wpt/cookies/name0009-test
new file mode 100644
index 0000000..f40d2c4
--- /dev/null
+++ b/test/wpt/cookies/name0009-test
@@ -0,0 +1 @@
+Set-Cookie: ^a=bar
diff --git a/test/wpt/cookies/name0010-expected b/test/wpt/cookies/name0010-expected
new file mode 100644
index 0000000..1e72557
--- /dev/null
+++ b/test/wpt/cookies/name0010-expected
@@ -0,0 +1 @@
+Cookie: &a=bar
diff --git a/test/wpt/cookies/name0010-test b/test/wpt/cookies/name0010-test
new file mode 100644
index 0000000..fb4fd92
--- /dev/null
+++ b/test/wpt/cookies/name0010-test
@@ -0,0 +1 @@
+Set-Cookie: &a=bar
diff --git a/test/wpt/cookies/name0011-expected b/test/wpt/cookies/name0011-expected
new file mode 100644
index 0000000..260d702
--- /dev/null
+++ b/test/wpt/cookies/name0011-expected
@@ -0,0 +1 @@
+Cookie: *a=bar
diff --git a/test/wpt/cookies/name0011-test b/test/wpt/cookies/name0011-test
new file mode 100644
index 0000000..b36b723
--- /dev/null
+++ b/test/wpt/cookies/name0011-test
@@ -0,0 +1 @@
+Set-Cookie: *a=bar
diff --git a/test/wpt/cookies/name0012-expected b/test/wpt/cookies/name0012-expected
new file mode 100644
index 0000000..0a2686a
--- /dev/null
+++ b/test/wpt/cookies/name0012-expected
@@ -0,0 +1 @@
+Cookie: (a=bar
diff --git a/test/wpt/cookies/name0012-test b/test/wpt/cookies/name0012-test
new file mode 100644
index 0000000..6927aac
--- /dev/null
+++ b/test/wpt/cookies/name0012-test
@@ -0,0 +1 @@
+Set-Cookie: (a=bar
diff --git a/test/wpt/cookies/name0013-expected b/test/wpt/cookies/name0013-expected
new file mode 100644
index 0000000..87dec78
--- /dev/null
+++ b/test/wpt/cookies/name0013-expected
@@ -0,0 +1 @@
+Cookie: )a=bar
diff --git a/test/wpt/cookies/name0013-test b/test/wpt/cookies/name0013-test
new file mode 100644
index 0000000..59ada98
--- /dev/null
+++ b/test/wpt/cookies/name0013-test
@@ -0,0 +1 @@
+Set-Cookie: )a=bar
diff --git a/test/wpt/cookies/name0014-expected b/test/wpt/cookies/name0014-expected
new file mode 100644
index 0000000..82bfe0e
--- /dev/null
+++ b/test/wpt/cookies/name0014-expected
@@ -0,0 +1 @@
+Cookie: -a=bar
diff --git a/test/wpt/cookies/name0014-test b/test/wpt/cookies/name0014-test
new file mode 100644
index 0000000..a113e99
--- /dev/null
+++ b/test/wpt/cookies/name0014-test
@@ -0,0 +1 @@
+Set-Cookie: -a=bar
diff --git a/test/wpt/cookies/name0015-expected b/test/wpt/cookies/name0015-expected
new file mode 100644
index 0000000..390b77b
--- /dev/null
+++ b/test/wpt/cookies/name0015-expected
@@ -0,0 +1 @@
+Cookie: _a=bar
diff --git a/test/wpt/cookies/name0015-test b/test/wpt/cookies/name0015-test
new file mode 100644
index 0000000..60fc074
--- /dev/null
+++ b/test/wpt/cookies/name0015-test
@@ -0,0 +1 @@
+Set-Cookie: _a=bar
diff --git a/test/wpt/cookies/name0016-expected b/test/wpt/cookies/name0016-expected
new file mode 100644
index 0000000..7d4d9e3
--- /dev/null
+++ b/test/wpt/cookies/name0016-expected
@@ -0,0 +1 @@
+Cookie: +=bar
diff --git a/test/wpt/cookies/name0016-test b/test/wpt/cookies/name0016-test
new file mode 100644
index 0000000..371dbcd
--- /dev/null
+++ b/test/wpt/cookies/name0016-test
@@ -0,0 +1 @@
+Set-Cookie: +=bar
diff --git a/test/wpt/cookies/name0017-expected b/test/wpt/cookies/name0017-expected
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/test/wpt/cookies/name0017-expected
diff --git a/test/wpt/cookies/name0017-test b/test/wpt/cookies/name0017-test
new file mode 100644
index 0000000..0561431
--- /dev/null
+++ b/test/wpt/cookies/name0017-test
@@ -0,0 +1 @@
+Set-Cookie: =a=bar
diff --git a/test/wpt/cookies/name0018-expected b/test/wpt/cookies/name0018-expected
new file mode 100644
index 0000000..9652792
--- /dev/null
+++ b/test/wpt/cookies/name0018-expected
@@ -0,0 +1 @@
+Cookie: a=bar
diff --git a/test/wpt/cookies/name0018-test b/test/wpt/cookies/name0018-test
new file mode 100644
index 0000000..e86a483
--- /dev/null
+++ b/test/wpt/cookies/name0018-test
@@ -0,0 +1 @@
+Set-Cookie: a =bar
diff --git a/test/wpt/cookies/name0019-expected b/test/wpt/cookies/name0019-expected
new file mode 100644
index 0000000..8d0bc2d
--- /dev/null
+++ b/test/wpt/cookies/name0019-expected
@@ -0,0 +1 @@
+Cookie: "a=bar
diff --git a/test/wpt/cookies/name0019-test b/test/wpt/cookies/name0019-test
new file mode 100644
index 0000000..d48e3f6
--- /dev/null
+++ b/test/wpt/cookies/name0019-test
@@ -0,0 +1 @@
+Set-Cookie: "a=bar
diff --git a/test/wpt/cookies/name0020-expected b/test/wpt/cookies/name0020-expected
new file mode 100644
index 0000000..aa9cd6d
--- /dev/null
+++ b/test/wpt/cookies/name0020-expected
@@ -0,0 +1 @@
+Cookie: "a=b"=bar
diff --git a/test/wpt/cookies/name0020-test b/test/wpt/cookies/name0020-test
new file mode 100644
index 0000000..b84f64d
--- /dev/null
+++ b/test/wpt/cookies/name0020-test
@@ -0,0 +1 @@
+Set-Cookie: "a=b"=bar
diff --git a/test/wpt/cookies/name0021-expected b/test/wpt/cookies/name0021-expected
new file mode 100644
index 0000000..206ff76
--- /dev/null
+++ b/test/wpt/cookies/name0021-expected
@@ -0,0 +1 @@
+Cookie: "a=qux
diff --git a/test/wpt/cookies/name0021-test b/test/wpt/cookies/name0021-test
new file mode 100644
index 0000000..56b319e
--- /dev/null
+++ b/test/wpt/cookies/name0021-test
@@ -0,0 +1,2 @@
+Set-Cookie: "a=b"=bar
+Set-Cookie: "a=qux
diff --git a/test/wpt/cookies/name0022-expected b/test/wpt/cookies/name0022-expected
new file mode 100644
index 0000000..b14d4f6
--- /dev/null
+++ b/test/wpt/cookies/name0022-expected
@@ -0,0 +1 @@
+Cookie: foo=bar
diff --git a/test/wpt/cookies/name0022-test b/test/wpt/cookies/name0022-test
new file mode 100644
index 0000000..cc59ff1
--- /dev/null
+++ b/test/wpt/cookies/name0022-test
@@ -0,0 +1 @@
+Set-Cookie: foo=bar
diff --git a/test/wpt/cookies/name0023-expected b/test/wpt/cookies/name0023-expected
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/test/wpt/cookies/name0023-expected
diff --git a/test/wpt/cookies/name0023-test b/test/wpt/cookies/name0023-test
new file mode 100644
index 0000000..b7f9cc2
--- /dev/null
+++ b/test/wpt/cookies/name0023-test
@@ -0,0 +1 @@
+Set-Cookie: foo;bar=baz
diff --git a/test/wpt/cookies/name0024-expected b/test/wpt/cookies/name0024-expected
new file mode 100644
index 0000000..5ac4f25
--- /dev/null
+++ b/test/wpt/cookies/name0024-expected
@@ -0,0 +1 @@
+Cookie: $Version=1
diff --git a/test/wpt/cookies/name0024-test b/test/wpt/cookies/name0024-test
new file mode 100644
index 0000000..da7b696
--- /dev/null
+++ b/test/wpt/cookies/name0024-test
@@ -0,0 +1 @@
+Set-Cookie: $Version=1; foo=bar
diff --git a/test/wpt/cookies/name0025-expected b/test/wpt/cookies/name0025-expected
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/test/wpt/cookies/name0025-expected
diff --git a/test/wpt/cookies/name0025-test b/test/wpt/cookies/name0025-test
new file mode 100644
index 0000000..708f006
--- /dev/null
+++ b/test/wpt/cookies/name0025-test
@@ -0,0 +1 @@
+Set-Cookie: ===a=bar
diff --git a/test/wpt/cookies/name0026-expected b/test/wpt/cookies/name0026-expected
new file mode 100644
index 0000000..b14d4f6
--- /dev/null
+++ b/test/wpt/cookies/name0026-expected
@@ -0,0 +1 @@
+Cookie: foo=bar
diff --git a/test/wpt/cookies/name0026-test b/test/wpt/cookies/name0026-test
new file mode 100644
index 0000000..bbeb77a
--- /dev/null
+++ b/test/wpt/cookies/name0026-test
@@ -0,0 +1 @@
+Set-Cookie: foo=bar
diff --git a/test/wpt/cookies/name0027-expected b/test/wpt/cookies/name0027-expected
new file mode 100644
index 0000000..b14d4f6
--- /dev/null
+++ b/test/wpt/cookies/name0027-expected
@@ -0,0 +1 @@
+Cookie: foo=bar
diff --git a/test/wpt/cookies/name0027-test b/test/wpt/cookies/name0027-test
new file mode 100644
index 0000000..d222227
--- /dev/null
+++ b/test/wpt/cookies/name0027-test
@@ -0,0 +1 @@
+Set-Cookie: foo=bar ;
diff --git a/test/wpt/cookies/name0028-expected b/test/wpt/cookies/name0028-expected
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/test/wpt/cookies/name0028-expected
diff --git a/test/wpt/cookies/name0028-test b/test/wpt/cookies/name0028-test
new file mode 100644
index 0000000..1c197e3
--- /dev/null
+++ b/test/wpt/cookies/name0028-test
@@ -0,0 +1 @@
+Set-Cookie: =a
diff --git a/test/wpt/cookies/name0029-expected b/test/wpt/cookies/name0029-expected
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/test/wpt/cookies/name0029-expected
diff --git a/test/wpt/cookies/name0029-test b/test/wpt/cookies/name0029-test
new file mode 100644
index 0000000..4421246
--- /dev/null
+++ b/test/wpt/cookies/name0029-test
@@ -0,0 +1 @@
+Set-Cookie: =
diff --git a/test/wpt/cookies/name0030-expected b/test/wpt/cookies/name0030-expected
new file mode 100644
index 0000000..a391380
--- /dev/null
+++ b/test/wpt/cookies/name0030-expected
@@ -0,0 +1 @@
+Cookie: foo bar=baz
diff --git a/test/wpt/cookies/name0030-test b/test/wpt/cookies/name0030-test
new file mode 100644
index 0000000..cf3ff16
--- /dev/null
+++ b/test/wpt/cookies/name0030-test
@@ -0,0 +1 @@
+Set-Cookie: foo bar=baz
diff --git a/test/wpt/cookies/name0031-expected b/test/wpt/cookies/name0031-expected
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/test/wpt/cookies/name0031-expected
diff --git a/test/wpt/cookies/name0031-test b/test/wpt/cookies/name0031-test
new file mode 100644
index 0000000..9394184
--- /dev/null
+++ b/test/wpt/cookies/name0031-test
@@ -0,0 +1 @@
+Set-Cookie: "foo;bar"=baz
diff --git a/test/wpt/cookies/name0032-expected b/test/wpt/cookies/name0032-expected
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/test/wpt/cookies/name0032-expected
diff --git a/test/wpt/cookies/name0032-test b/test/wpt/cookies/name0032-test
new file mode 100644
index 0000000..93fc975
--- /dev/null
+++ b/test/wpt/cookies/name0032-test
@@ -0,0 +1 @@
+Set-Cookie: "foo\"bar;baz"=qux
diff --git a/test/wpt/cookies/name0033-expected b/test/wpt/cookies/name0033-expected
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/test/wpt/cookies/name0033-expected
diff --git a/test/wpt/cookies/name0033-test b/test/wpt/cookies/name0033-test
new file mode 100644
index 0000000..7bbdd89
--- /dev/null
+++ b/test/wpt/cookies/name0033-test
@@ -0,0 +1,2 @@
+Set-Cookie: =foo=bar
+Set-Cookie: aaa
diff --git a/test/wpt/cookies/optional-domain0030-expected b/test/wpt/cookies/optional-domain0030-expected
new file mode 100644
index 0000000..b14d4f6
--- /dev/null
+++ b/test/wpt/cookies/optional-domain0030-expected
@@ -0,0 +1 @@
+Cookie: foo=bar
diff --git a/test/wpt/cookies/optional-domain0030-test b/test/wpt/cookies/optional-domain0030-test
new file mode 100644
index 0000000..3ab75aa
--- /dev/null
+++ b/test/wpt/cookies/optional-domain0030-test
@@ -0,0 +1,2 @@
+Set-Cookie: foo=bar; domain=
+Location: http://home.example.org:8888/cookie-parser-result?optional-domain0030
diff --git a/test/wpt/cookies/optional-domain0041-expected b/test/wpt/cookies/optional-domain0041-expected
new file mode 100644
index 0000000..b14d4f6
--- /dev/null
+++ b/test/wpt/cookies/optional-domain0041-expected
@@ -0,0 +1 @@
+Cookie: foo=bar
diff --git a/test/wpt/cookies/optional-domain0041-test b/test/wpt/cookies/optional-domain0041-test
new file mode 100644
index 0000000..b85a6c9
--- /dev/null
+++ b/test/wpt/cookies/optional-domain0041-test
@@ -0,0 +1,2 @@
+Set-Cookie: foo=bar; domain=example.org; domain=
+Location: http://home.example.org:8888/cookie-parser-result?optional-domain0041
diff --git a/test/wpt/cookies/optional-domain0042-expected b/test/wpt/cookies/optional-domain0042-expected
new file mode 100644
index 0000000..8b13789
--- /dev/null
+++ b/test/wpt/cookies/optional-domain0042-expected
@@ -0,0 +1 @@
+
diff --git a/test/wpt/cookies/optional-domain0042-test b/test/wpt/cookies/optional-domain0042-test
new file mode 100644
index 0000000..524d192
--- /dev/null
+++ b/test/wpt/cookies/optional-domain0042-test
@@ -0,0 +1,2 @@
+Set-Cookie: foo=bar; domain=foo.example.org; domain=
+Location: http://home.example.org:8888/cookie-parser-result?optional-domain0042
diff --git a/test/wpt/cookies/optional-domain0043-expected b/test/wpt/cookies/optional-domain0043-expected
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/test/wpt/cookies/optional-domain0043-expected
diff --git a/test/wpt/cookies/optional-domain0043-test b/test/wpt/cookies/optional-domain0043-test
new file mode 100644
index 0000000..506cdc4
--- /dev/null
+++ b/test/wpt/cookies/optional-domain0043-test
@@ -0,0 +1,2 @@
+Set-Cookie: foo=bar; domain=foo.example.org; domain=
+Location: http://subdomain.home.example.org:8888/cookie-parser-result?optional-domain0043
diff --git a/test/wpt/cookies/ordering0001-expected b/test/wpt/cookies/ordering0001-expected
new file mode 100644
index 0000000..3d81959
--- /dev/null
+++ b/test/wpt/cookies/ordering0001-expected
@@ -0,0 +1 @@
+Cookie: key=val5; key=val1; key=val2; key=val4
diff --git a/test/wpt/cookies/ordering0001-test b/test/wpt/cookies/ordering0001-test
new file mode 100644
index 0000000..ba6e85c
--- /dev/null
+++ b/test/wpt/cookies/ordering0001-test
@@ -0,0 +1,7 @@
+Set-Cookie: key=val0;
+Set-Cookie: key=val1; path=/cookie-parser-result
+Set-Cookie: key=val2; path=/
+Set-Cookie: key=val3; path=/bar
+Set-Cookie: key=val4; domain=.example.org
+Set-Cookie: key=val5; domain=.example.org; path=/cookie-parser-result/foo
+Location: /cookie-parser-result/foo/baz?ordering0001
diff --git a/test/wpt/cookies/path0001-expected b/test/wpt/cookies/path0001-expected
new file mode 100644
index 0000000..785d0a2
--- /dev/null
+++ b/test/wpt/cookies/path0001-expected
@@ -0,0 +1 @@
+Cookie: x=y; a=b
diff --git a/test/wpt/cookies/path0001-test b/test/wpt/cookies/path0001-test
new file mode 100644
index 0000000..ed81cb9
--- /dev/null
+++ b/test/wpt/cookies/path0001-test
@@ -0,0 +1,2 @@
+Set-Cookie: a=b; path=/
+Set-Cookie: x=y; path=/cookie-parser-result
diff --git a/test/wpt/cookies/path0002-expected b/test/wpt/cookies/path0002-expected
new file mode 100644
index 0000000..2314ba0
--- /dev/null
+++ b/test/wpt/cookies/path0002-expected
@@ -0,0 +1 @@
+Cookie: a=b; x=y
diff --git a/test/wpt/cookies/path0002-test b/test/wpt/cookies/path0002-test
new file mode 100644
index 0000000..2249328
--- /dev/null
+++ b/test/wpt/cookies/path0002-test
@@ -0,0 +1,2 @@
+Set-Cookie: a=b; path=/cookie-parser-result
+Set-Cookie: x=y; path=/
diff --git a/test/wpt/cookies/path0003-expected b/test/wpt/cookies/path0003-expected
new file mode 100644
index 0000000..2314ba0
--- /dev/null
+++ b/test/wpt/cookies/path0003-expected
@@ -0,0 +1 @@
+Cookie: a=b; x=y
diff --git a/test/wpt/cookies/path0003-test b/test/wpt/cookies/path0003-test
new file mode 100644
index 0000000..e4b5a4b
--- /dev/null
+++ b/test/wpt/cookies/path0003-test
@@ -0,0 +1,2 @@
+Set-Cookie: x=y; path=/
+Set-Cookie: a=b; path=/cookie-parser-result
diff --git a/test/wpt/cookies/path0004-expected b/test/wpt/cookies/path0004-expected
new file mode 100644
index 0000000..785d0a2
--- /dev/null
+++ b/test/wpt/cookies/path0004-expected
@@ -0,0 +1 @@
+Cookie: x=y; a=b
diff --git a/test/wpt/cookies/path0004-test b/test/wpt/cookies/path0004-test
new file mode 100644
index 0000000..a80ea6e
--- /dev/null
+++ b/test/wpt/cookies/path0004-test
@@ -0,0 +1,2 @@
+Set-Cookie: x=y; path=/cookie-parser-result
+Set-Cookie: a=b; path=/
diff --git a/test/wpt/cookies/path0005-expected b/test/wpt/cookies/path0005-expected
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/test/wpt/cookies/path0005-expected
diff --git a/test/wpt/cookies/path0005-test b/test/wpt/cookies/path0005-test
new file mode 100644
index 0000000..6447c91
--- /dev/null
+++ b/test/wpt/cookies/path0005-test
@@ -0,0 +1 @@
+Set-Cookie: foo=bar; path=/cookie-parser-result/foo
diff --git a/test/wpt/cookies/path0006-expected b/test/wpt/cookies/path0006-expected
new file mode 100644
index 0000000..b14d4f6
--- /dev/null
+++ b/test/wpt/cookies/path0006-expected
@@ -0,0 +1 @@
+Cookie: foo=bar
diff --git a/test/wpt/cookies/path0006-test b/test/wpt/cookies/path0006-test
new file mode 100644
index 0000000..07ecf27
--- /dev/null
+++ b/test/wpt/cookies/path0006-test
@@ -0,0 +1,2 @@
+Set-Cookie: foo=bar
+Set-Cookie: foo=qux; path=/cookie-parser-result/foo
diff --git a/test/wpt/cookies/path0007-expected b/test/wpt/cookies/path0007-expected
new file mode 100644
index 0000000..b14d4f6
--- /dev/null
+++ b/test/wpt/cookies/path0007-expected
@@ -0,0 +1 @@
+Cookie: foo=bar
diff --git a/test/wpt/cookies/path0007-test b/test/wpt/cookies/path0007-test
new file mode 100644
index 0000000..66a54de
--- /dev/null
+++ b/test/wpt/cookies/path0007-test
@@ -0,0 +1,2 @@
+Set-Cookie: foo=bar; path=/cookie-parser-result/foo
+Location: /cookie-parser-result/foo?path0007
diff --git a/test/wpt/cookies/path0008-expected b/test/wpt/cookies/path0008-expected
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/test/wpt/cookies/path0008-expected
diff --git a/test/wpt/cookies/path0008-test b/test/wpt/cookies/path0008-test
new file mode 100644
index 0000000..b10012d
--- /dev/null
+++ b/test/wpt/cookies/path0008-test
@@ -0,0 +1,2 @@
+Set-Cookie: foo=bar; path=/cookie-parser-result/foo
+Location: /cookie-parser-result/bar?path0008
diff --git a/test/wpt/cookies/path0009-expected b/test/wpt/cookies/path0009-expected
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/test/wpt/cookies/path0009-expected
diff --git a/test/wpt/cookies/path0009-test b/test/wpt/cookies/path0009-test
new file mode 100644
index 0000000..874f21b
--- /dev/null
+++ b/test/wpt/cookies/path0009-test
@@ -0,0 +1,2 @@
+Set-Cookie: foo=bar; path=/cookie-parser-result/foo/qux
+Location: /cookie-parser-result/foo?path0009
diff --git a/test/wpt/cookies/path0010-expected b/test/wpt/cookies/path0010-expected
new file mode 100644
index 0000000..b14d4f6
--- /dev/null
+++ b/test/wpt/cookies/path0010-expected
@@ -0,0 +1 @@
+Cookie: foo=bar
diff --git a/test/wpt/cookies/path0010-test b/test/wpt/cookies/path0010-test
new file mode 100644
index 0000000..0ea62fd
--- /dev/null
+++ b/test/wpt/cookies/path0010-test
@@ -0,0 +1,2 @@
+Set-Cookie: foo=bar; path=/cookie-parser-result/foo/qux
+Location: /cookie-parser-result/foo/qux?path0010
diff --git a/test/wpt/cookies/path0011-expected b/test/wpt/cookies/path0011-expected
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/test/wpt/cookies/path0011-expected
diff --git a/test/wpt/cookies/path0011-test b/test/wpt/cookies/path0011-test
new file mode 100644
index 0000000..35ea062
--- /dev/null
+++ b/test/wpt/cookies/path0011-test
@@ -0,0 +1,2 @@
+Set-Cookie: foo=bar; path=/cookie-parser-result/foo/qux
+Location: /cookie-parser-result/bar/qux?path0011
diff --git a/test/wpt/cookies/path0012-expected b/test/wpt/cookies/path0012-expected
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/test/wpt/cookies/path0012-expected
diff --git a/test/wpt/cookies/path0012-test b/test/wpt/cookies/path0012-test
new file mode 100644
index 0000000..4c05778
--- /dev/null
+++ b/test/wpt/cookies/path0012-test
@@ -0,0 +1,2 @@
+Set-Cookie: foo=bar; path=/cookie-parser-result/foo/qux
+Location: /cookie-parser-result/foo/baz?path0012
diff --git a/test/wpt/cookies/path0013-expected b/test/wpt/cookies/path0013-expected
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/test/wpt/cookies/path0013-expected
diff --git a/test/wpt/cookies/path0013-test b/test/wpt/cookies/path0013-test
new file mode 100644
index 0000000..d17b99b
--- /dev/null
+++ b/test/wpt/cookies/path0013-test
@@ -0,0 +1,2 @@
+Set-Cookie: foo=bar; path=/cookie-parser-result/foo/qux/
+Location: /cookie-parser-result/foo/baz?path0013
diff --git a/test/wpt/cookies/path0014-expected b/test/wpt/cookies/path0014-expected
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/test/wpt/cookies/path0014-expected
diff --git a/test/wpt/cookies/path0014-test b/test/wpt/cookies/path0014-test
new file mode 100644
index 0000000..a953e70
--- /dev/null
+++ b/test/wpt/cookies/path0014-test
@@ -0,0 +1,2 @@
+Set-Cookie: foo=bar; path=/cookie-parser-result/foo/qux/
+Location: /cookie-parser-result/foo/qux?path0014
diff --git a/test/wpt/cookies/path0015-expected b/test/wpt/cookies/path0015-expected
new file mode 100644
index 0000000..b14d4f6
--- /dev/null
+++ b/test/wpt/cookies/path0015-expected
@@ -0,0 +1 @@
+Cookie: foo=bar
diff --git a/test/wpt/cookies/path0015-test b/test/wpt/cookies/path0015-test
new file mode 100644
index 0000000..253a9bb
--- /dev/null
+++ b/test/wpt/cookies/path0015-test
@@ -0,0 +1,2 @@
+Set-Cookie: foo=bar; path=/cookie-parser-result/foo/qux/
+Location: /cookie-parser-result/foo/qux/?path0015
diff --git a/test/wpt/cookies/path0016-expected b/test/wpt/cookies/path0016-expected
new file mode 100644
index 0000000..b14d4f6
--- /dev/null
+++ b/test/wpt/cookies/path0016-expected
@@ -0,0 +1 @@
+Cookie: foo=bar
diff --git a/test/wpt/cookies/path0016-test b/test/wpt/cookies/path0016-test
new file mode 100644
index 0000000..433faeb
--- /dev/null
+++ b/test/wpt/cookies/path0016-test
@@ -0,0 +1,2 @@
+Set-Cookie: foo=bar; path=/cookie-parser-result/foo/
+Location: /cookie-parser-result/foo/qux?path0016
diff --git a/test/wpt/cookies/path0017-expected b/test/wpt/cookies/path0017-expected
new file mode 100644
index 0000000..b14d4f6
--- /dev/null
+++ b/test/wpt/cookies/path0017-expected
@@ -0,0 +1 @@
+Cookie: foo=bar
diff --git a/test/wpt/cookies/path0017-test b/test/wpt/cookies/path0017-test
new file mode 100644
index 0000000..a602d7c
--- /dev/null
+++ b/test/wpt/cookies/path0017-test
@@ -0,0 +1,2 @@
+Set-Cookie: foo=bar; path=/cookie-parser-result/foo/
+Location: /cookie-parser-result/foo//qux?path0017
diff --git a/test/wpt/cookies/path0018-expected b/test/wpt/cookies/path0018-expected
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/test/wpt/cookies/path0018-expected
diff --git a/test/wpt/cookies/path0018-test b/test/wpt/cookies/path0018-test
new file mode 100644
index 0000000..37040da
--- /dev/null
+++ b/test/wpt/cookies/path0018-test
@@ -0,0 +1,2 @@
+Set-Cookie: foo=bar; path=/cookie-parser-result/foo/
+Location: /cookie-parser-result/fooqux?path0018
diff --git a/test/wpt/cookies/path0019-expected b/test/wpt/cookies/path0019-expected
new file mode 100644
index 0000000..b14d4f6
--- /dev/null
+++ b/test/wpt/cookies/path0019-expected
@@ -0,0 +1 @@
+Cookie: foo=bar
diff --git a/test/wpt/cookies/path0019-test b/test/wpt/cookies/path0019-test
new file mode 100644
index 0000000..6d49860
--- /dev/null
+++ b/test/wpt/cookies/path0019-test
@@ -0,0 +1 @@
+Set-Cookie: foo=bar; path
diff --git a/test/wpt/cookies/path0020-expected b/test/wpt/cookies/path0020-expected
new file mode 100644
index 0000000..b14d4f6
--- /dev/null
+++ b/test/wpt/cookies/path0020-expected
@@ -0,0 +1 @@
+Cookie: foo=bar
diff --git a/test/wpt/cookies/path0020-test b/test/wpt/cookies/path0020-test
new file mode 100644
index 0000000..603eded
--- /dev/null
+++ b/test/wpt/cookies/path0020-test
@@ -0,0 +1 @@
+Set-Cookie: foo=bar; path=
diff --git a/test/wpt/cookies/path0021-expected b/test/wpt/cookies/path0021-expected
new file mode 100644
index 0000000..b14d4f6
--- /dev/null
+++ b/test/wpt/cookies/path0021-expected
@@ -0,0 +1 @@
+Cookie: foo=bar
diff --git a/test/wpt/cookies/path0021-test b/test/wpt/cookies/path0021-test
new file mode 100644
index 0000000..4577c51
--- /dev/null
+++ b/test/wpt/cookies/path0021-test
@@ -0,0 +1 @@
+Set-Cookie: foo=bar; path=/
diff --git a/test/wpt/cookies/path0022-expected b/test/wpt/cookies/path0022-expected
new file mode 100644
index 0000000..b14d4f6
--- /dev/null
+++ b/test/wpt/cookies/path0022-expected
@@ -0,0 +1 @@
+Cookie: foo=bar
diff --git a/test/wpt/cookies/path0022-test b/test/wpt/cookies/path0022-test
new file mode 100644
index 0000000..4aade9e
--- /dev/null
+++ b/test/wpt/cookies/path0022-test
@@ -0,0 +1 @@
+Set-Cookie: foo=bar; path= /
diff --git a/test/wpt/cookies/path0023-expected b/test/wpt/cookies/path0023-expected
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/test/wpt/cookies/path0023-expected
diff --git a/test/wpt/cookies/path0023-test b/test/wpt/cookies/path0023-test
new file mode 100644
index 0000000..f14d683
--- /dev/null
+++ b/test/wpt/cookies/path0023-test
@@ -0,0 +1 @@
+Set-Cookie: foo=bar; Path=/cookie-PARSER-result
diff --git a/test/wpt/cookies/path0024-expected b/test/wpt/cookies/path0024-expected
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/test/wpt/cookies/path0024-expected
diff --git a/test/wpt/cookies/path0024-test b/test/wpt/cookies/path0024-test
new file mode 100644
index 0000000..18a71c8
--- /dev/null
+++ b/test/wpt/cookies/path0024-test
@@ -0,0 +1,2 @@
+Set-Cookie: foo=bar; path=/cookie-parser-result/foo/qux?
+Location: /cookie-parser-result/foo/qux?path0024
diff --git a/test/wpt/cookies/path0025-expected b/test/wpt/cookies/path0025-expected
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/test/wpt/cookies/path0025-expected
diff --git a/test/wpt/cookies/path0025-test b/test/wpt/cookies/path0025-test
new file mode 100644
index 0000000..b6c497b
--- /dev/null
+++ b/test/wpt/cookies/path0025-test
@@ -0,0 +1,2 @@
+Set-Cookie: foo=bar; path=/cookie-parser-result/foo/qux#
+Location: /cookie-parser-result/foo/qux?path0025
diff --git a/test/wpt/cookies/path0026-expected b/test/wpt/cookies/path0026-expected
new file mode 100644
index 0000000..b14d4f6
--- /dev/null
+++ b/test/wpt/cookies/path0026-expected
@@ -0,0 +1 @@
+Cookie: foo=bar
diff --git a/test/wpt/cookies/path0026-test b/test/wpt/cookies/path0026-test
new file mode 100644
index 0000000..ffc3b7a
--- /dev/null
+++ b/test/wpt/cookies/path0026-test
@@ -0,0 +1,2 @@
+Set-Cookie: foo=bar; path=/cookie-parser-result/foo/qux;
+Location: /cookie-parser-result/foo/qux?path0026
diff --git a/test/wpt/cookies/path0027-expected b/test/wpt/cookies/path0027-expected
new file mode 100644
index 0000000..b14d4f6
--- /dev/null
+++ b/test/wpt/cookies/path0027-expected
@@ -0,0 +1 @@
+Cookie: foo=bar
diff --git a/test/wpt/cookies/path0027-test b/test/wpt/cookies/path0027-test
new file mode 100644
index 0000000..bd021f3
--- /dev/null
+++ b/test/wpt/cookies/path0027-test
@@ -0,0 +1,2 @@
+Set-Cookie: foo=bar; path="/cookie-parser-result/foo/qux;"
+Location: /cookie-parser-result/foo/qux?path0027
diff --git a/test/wpt/cookies/path0028-expected b/test/wpt/cookies/path0028-expected
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/test/wpt/cookies/path0028-expected
diff --git a/test/wpt/cookies/path0028-test b/test/wpt/cookies/path0028-test
new file mode 100644
index 0000000..3bcd6a5
--- /dev/null
+++ b/test/wpt/cookies/path0028-test
@@ -0,0 +1,2 @@
+Set-Cookie: foo=bar; path=/cookie-parser-result/f%6Fo/bar
+Location: /cookie-parser-result/foo/bar?path0028
diff --git a/test/wpt/cookies/path0029-expected b/test/wpt/cookies/path0029-expected
new file mode 100644
index 0000000..1022f64
--- /dev/null
+++ b/test/wpt/cookies/path0029-expected
@@ -0,0 +1 @@
+Cookie: a=b
diff --git a/test/wpt/cookies/path0029-test b/test/wpt/cookies/path0029-test
new file mode 100644
index 0000000..17bd42f
--- /dev/null
+++ b/test/wpt/cookies/path0029-test
@@ -0,0 +1,2 @@
+Set-Cookie: a=b; path = /cookie-parser-result
+Set-Cookie: x=y; path = /book
diff --git a/test/wpt/cookies/path0030-expected b/test/wpt/cookies/path0030-expected
new file mode 100644
index 0000000..b14d4f6
--- /dev/null
+++ b/test/wpt/cookies/path0030-expected
@@ -0,0 +1 @@
+Cookie: foo=bar
diff --git a/test/wpt/cookies/path0030-test b/test/wpt/cookies/path0030-test
new file mode 100644
index 0000000..e17a2d4
--- /dev/null
+++ b/test/wpt/cookies/path0030-test
@@ -0,0 +1 @@
+Set-Cookie: foo=bar; path=/dog; path=
diff --git a/test/wpt/cookies/path0031-expected b/test/wpt/cookies/path0031-expected
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/test/wpt/cookies/path0031-expected
diff --git a/test/wpt/cookies/path0031-test b/test/wpt/cookies/path0031-test
new file mode 100644
index 0000000..3b24090
--- /dev/null
+++ b/test/wpt/cookies/path0031-test
@@ -0,0 +1 @@
+Set-Cookie: foo=bar; path=; path=/dog
diff --git a/test/wpt/cookies/path0032-expected b/test/wpt/cookies/path0032-expected
new file mode 100644
index 0000000..e7403c4
--- /dev/null
+++ b/test/wpt/cookies/path0032-expected
@@ -0,0 +1 @@
+Cookie: foo=qux; foo=bar
diff --git a/test/wpt/cookies/path0032-test b/test/wpt/cookies/path0032-test
new file mode 100644
index 0000000..db6ceb2
--- /dev/null
+++ b/test/wpt/cookies/path0032-test
@@ -0,0 +1,3 @@
+Set-Cookie: foo=bar; path=/cookie-parser-result
+Set-Cookie: foo=qux; path=/cookie-parser-result/
+Location: /cookie-parser-result/dog?path0032
diff --git a/test/wpt/cookies/value0001-expected b/test/wpt/cookies/value0001-expected
new file mode 100644
index 0000000..b14d4f6
--- /dev/null
+++ b/test/wpt/cookies/value0001-expected
@@ -0,0 +1 @@
+Cookie: foo=bar
diff --git a/test/wpt/cookies/value0001-test b/test/wpt/cookies/value0001-test
new file mode 100644
index 0000000..38b7dd2
--- /dev/null
+++ b/test/wpt/cookies/value0001-test
@@ -0,0 +1 @@
+Set-Cookie: foo= bar
diff --git a/test/wpt/cookies/value0002-expected b/test/wpt/cookies/value0002-expected
new file mode 100644
index 0000000..9e96a81
--- /dev/null
+++ b/test/wpt/cookies/value0002-expected
@@ -0,0 +1 @@
+Cookie: foo="bar"
diff --git a/test/wpt/cookies/value0002-test b/test/wpt/cookies/value0002-test
new file mode 100644
index 0000000..bed691f
--- /dev/null
+++ b/test/wpt/cookies/value0002-test
@@ -0,0 +1 @@
+Set-Cookie: foo="bar"
diff --git a/test/wpt/cookies/value0003-expected b/test/wpt/cookies/value0003-expected
new file mode 100644
index 0000000..5cc2d46
--- /dev/null
+++ b/test/wpt/cookies/value0003-expected
@@ -0,0 +1 @@
+Cookie: foo=" bar "
diff --git a/test/wpt/cookies/value0003-test b/test/wpt/cookies/value0003-test
new file mode 100644
index 0000000..ce1d455
--- /dev/null
+++ b/test/wpt/cookies/value0003-test
@@ -0,0 +1 @@
+Set-Cookie: foo=" bar "
diff --git a/test/wpt/cookies/value0004-expected b/test/wpt/cookies/value0004-expected
new file mode 100644
index 0000000..400030f
--- /dev/null
+++ b/test/wpt/cookies/value0004-expected
@@ -0,0 +1 @@
+Cookie: foo="bar
diff --git a/test/wpt/cookies/value0004-test b/test/wpt/cookies/value0004-test
new file mode 100644
index 0000000..c569216
--- /dev/null
+++ b/test/wpt/cookies/value0004-test
@@ -0,0 +1 @@
+Set-Cookie: foo="bar;baz"
diff --git a/test/wpt/cookies/value0005-expected b/test/wpt/cookies/value0005-expected
new file mode 100644
index 0000000..cad285f
--- /dev/null
+++ b/test/wpt/cookies/value0005-expected
@@ -0,0 +1 @@
+Cookie: foo="bar=baz"
diff --git a/test/wpt/cookies/value0005-test b/test/wpt/cookies/value0005-test
new file mode 100644
index 0000000..514c0f1
--- /dev/null
+++ b/test/wpt/cookies/value0005-test
@@ -0,0 +1 @@
+Set-Cookie: foo="bar=baz"
diff --git a/test/wpt/cookies/value0006-expected b/test/wpt/cookies/value0006-expected
new file mode 100644
index 0000000..b14d4f6
--- /dev/null
+++ b/test/wpt/cookies/value0006-expected
@@ -0,0 +1 @@
+Cookie: foo=bar
diff --git a/test/wpt/cookies/value0006-test b/test/wpt/cookies/value0006-test
new file mode 100644
index 0000000..a939a82
--- /dev/null
+++ b/test/wpt/cookies/value0006-test
@@ -0,0 +1 @@
+Set-Cookie: foo = bar ; ttt