2007-01-22 21:25:56 -05:00
|
|
|
<testcase>
|
2007-10-11 21:44:22 -04:00
|
|
|
<info>
|
|
|
|
<keywords>
|
|
|
|
HTTP
|
|
|
|
HTTP GET
|
|
|
|
cookies
|
|
|
|
shared cookies
|
|
|
|
</keywords>
|
|
|
|
</info>
|
|
|
|
|
2003-08-11 02:44:46 -04:00
|
|
|
# Server-side
|
|
|
|
<reply>
|
|
|
|
<data1>
|
|
|
|
HTTP/1.1 200 OK
|
2020-02-28 09:00:03 -05:00
|
|
|
Date: Tue, 09 Nov 2010 14:49:00 GMT
|
2003-08-11 02:44:46 -04:00
|
|
|
Server: test-server/fake
|
|
|
|
Content-Type: text/html
|
2007-02-04 21:38:25 -05:00
|
|
|
Set-Cookie: test1=one; domain=foo.com; expires=Sat Feb 2 11:56:27 GMT 2030
|
|
|
|
Set-Cookie: test2=two; domain=host.foo.com; expires=Sat Feb 2 11:56:27 GMT 2030
|
|
|
|
Set-Cookie: test3=three; domain=foo.com; expires=Sat Feb 2 11:56:27 GMT 2030
|
2003-08-11 02:44:46 -04:00
|
|
|
Content-Length: 29
|
|
|
|
|
|
|
|
run 1: set cookie 1, 2 and 3
|
|
|
|
</data1>
|
|
|
|
<data2>
|
|
|
|
HTTP/1.1 200 OK
|
2020-02-28 09:00:03 -05:00
|
|
|
Date: Tue, 09 Nov 2010 14:49:01 GMT
|
2003-08-11 02:44:46 -04:00
|
|
|
Server: test-server/fake
|
|
|
|
Content-Type: text/html
|
2007-02-04 21:38:25 -05:00
|
|
|
Set-Cookie: test4=four; domain=host.foo.com; expires=Sat Feb 2 11:56:27 GMT 2030
|
|
|
|
Set-Cookie: test5=five; domain=host.foo.com; expires=Sat Feb 2 11:56:27 GMT 2030
|
2003-08-11 02:44:46 -04:00
|
|
|
Content-Length: 26
|
|
|
|
|
|
|
|
run 2: set cookie 4 and 5
|
|
|
|
</data2>
|
|
|
|
<data3>
|
|
|
|
HTTP/1.1 200 OK
|
2020-02-28 09:00:03 -05:00
|
|
|
Date: Tue, 09 Nov 2010 14:49:02 GMT
|
2003-08-11 02:44:46 -04:00
|
|
|
Server: test-server/fake
|
|
|
|
Content-Type: text/html
|
|
|
|
Funny-head: yesyes
|
2007-02-04 21:38:25 -05:00
|
|
|
Set-Cookie: test4=overwritten4; domain=host.foo.com; expires=Sat May 5 GMT 11:56:27 2035
|
|
|
|
Set-Cookie: test1=overwritten1; domain=foo.com; expires=Thu Mar 3 GMT 11:56:27 2033
|
2016-10-03 00:34:59 -04:00
|
|
|
Set-Cookie: test6=six; domain=.www.host.foo.com; expires=Thu Mar 3 GMT 11:56:27 2033
|
|
|
|
Set-Cookie: test6=six_more; expires=Thu Mar 3 GMT 11:56:27 2033
|
2003-08-11 02:44:46 -04:00
|
|
|
Content-Type: text/html
|
2016-10-03 00:34:59 -04:00
|
|
|
Content-Length: 73
|
2003-08-11 02:44:46 -04:00
|
|
|
|
2016-10-03 00:34:59 -04:00
|
|
|
run 3: overwrite cookie 1 and 4, set cookie 6 with and without tailmatch
|
2005-06-03 10:06:03 -04:00
|
|
|
</data3>
|
2003-08-11 02:44:46 -04:00
|
|
|
</reply>
|
|
|
|
|
|
|
|
# Client-side
|
|
|
|
<client>
|
|
|
|
<server>
|
|
|
|
http
|
|
|
|
</server>
|
2020-11-26 11:24:55 -05:00
|
|
|
# don't run this with the threaded-resolver or c-ares since the events might
|
|
|
|
# trigger in a different order!
|
2017-07-06 05:11:43 -04:00
|
|
|
<features>
|
|
|
|
!threaded-resolver
|
2020-11-26 11:24:55 -05:00
|
|
|
!c-ares
|
2017-07-06 05:11:43 -04:00
|
|
|
</features>
|
2003-08-11 02:44:46 -04:00
|
|
|
<name>
|
|
|
|
HTTP with shared cookie list (and dns cache)
|
|
|
|
</name>
|
2007-07-10 18:27:16 -04:00
|
|
|
# Explicitly set the time zone to a known good one, in case the user is
|
|
|
|
# using one of the 'right' zones that take into account leap seconds
|
|
|
|
# which causes the cookie expiry times to be different.
|
|
|
|
<setenv>
|
|
|
|
TZ=GMT
|
|
|
|
</setenv>
|
2003-08-11 02:44:46 -04:00
|
|
|
<tool>
|
|
|
|
lib506
|
|
|
|
</tool>
|
|
|
|
<command>
|
2004-09-08 04:08:38 -04:00
|
|
|
http://%HOSTIP:%HTTPPORT/506
|
2003-08-11 02:44:46 -04:00
|
|
|
</command>
|
|
|
|
</client>
|
|
|
|
|
|
|
|
# Verify data after the test has been "shot"
|
|
|
|
<verify>
|
2014-01-31 18:58:58 -05:00
|
|
|
<stdout>
|
2003-08-11 02:44:46 -04:00
|
|
|
GLOBAL_INIT
|
|
|
|
SHARE_INIT
|
2006-07-17 12:47:07 -04:00
|
|
|
CURLSHOPT_LOCKFUNC
|
|
|
|
CURLSHOPT_UNLOCKFUNC
|
|
|
|
CURLSHOPT_USERDATA
|
2003-08-11 02:44:46 -04:00
|
|
|
CURL_LOCK_DATA_COOKIE
|
|
|
|
CURL_LOCK_DATA_DNS
|
|
|
|
CURLOPT_SHARE
|
2008-09-15 18:35:09 -04:00
|
|
|
lock: share [Pigs in space]: 0
|
|
|
|
unlock: share [Pigs in space]: 1
|
2013-06-17 17:28:35 -04:00
|
|
|
CURLOPT_COOKIELIST injected_and_clobbered
|
|
|
|
lock: cookie [Pigs in space]: 2
|
|
|
|
unlock: cookie [Pigs in space]: 3
|
|
|
|
CURLOPT_COOKIELIST ALL
|
|
|
|
lock: cookie [Pigs in space]: 4
|
|
|
|
unlock: cookie [Pigs in space]: 5
|
|
|
|
CURLOPT_COOKIELIST session
|
2008-09-15 18:35:09 -04:00
|
|
|
lock: cookie [Pigs in space]: 6
|
|
|
|
unlock: cookie [Pigs in space]: 7
|
2013-06-17 17:28:35 -04:00
|
|
|
CURLOPT_COOKIELIST injected
|
2008-09-15 18:35:09 -04:00
|
|
|
lock: cookie [Pigs in space]: 8
|
|
|
|
unlock: cookie [Pigs in space]: 9
|
2013-06-17 17:28:35 -04:00
|
|
|
CURLOPT_COOKIELIST SESS
|
2008-09-15 18:35:09 -04:00
|
|
|
lock: cookie [Pigs in space]: 10
|
|
|
|
unlock: cookie [Pigs in space]: 11
|
2013-06-17 17:28:35 -04:00
|
|
|
CLEANUP
|
2008-09-15 18:35:09 -04:00
|
|
|
lock: cookie [Pigs in space]: 12
|
|
|
|
unlock: cookie [Pigs in space]: 13
|
2013-06-17 17:28:35 -04:00
|
|
|
lock: share [Pigs in space]: 14
|
|
|
|
unlock: share [Pigs in space]: 15
|
|
|
|
*** run 1
|
2007-06-21 10:23:38 -04:00
|
|
|
CURLOPT_SHARE
|
2013-06-17 17:28:35 -04:00
|
|
|
lock: share [Pigs in space]: 16
|
|
|
|
unlock: share [Pigs in space]: 17
|
2003-08-11 02:44:46 -04:00
|
|
|
PERFORM
|
2019-09-27 03:41:43 -04:00
|
|
|
lock: cookie [Pigs in space]: 18
|
|
|
|
unlock: cookie [Pigs in space]: 19
|
2013-06-17 17:28:35 -04:00
|
|
|
lock: dns [Pigs in space]: 20
|
|
|
|
unlock: dns [Pigs in space]: 21
|
2019-09-27 03:41:43 -04:00
|
|
|
lock: dns [Pigs in space]: 22
|
|
|
|
unlock: dns [Pigs in space]: 23
|
2013-01-17 06:59:23 -05:00
|
|
|
lock: cookie [Pigs in space]: 24
|
|
|
|
unlock: cookie [Pigs in space]: 25
|
2008-09-15 18:35:09 -04:00
|
|
|
lock: cookie [Pigs in space]: 26
|
|
|
|
unlock: cookie [Pigs in space]: 27
|
|
|
|
lock: cookie [Pigs in space]: 28
|
|
|
|
unlock: cookie [Pigs in space]: 29
|
2019-09-27 03:41:43 -04:00
|
|
|
lock: cookie [Pigs in space]: 30
|
|
|
|
unlock: cookie [Pigs in space]: 31
|
2013-06-17 17:28:35 -04:00
|
|
|
run 1: set cookie 1, 2 and 3
|
2017-12-09 17:50:05 -05:00
|
|
|
lock: dns [Pigs in space]: 32
|
|
|
|
unlock: dns [Pigs in space]: 33
|
2019-09-27 03:41:43 -04:00
|
|
|
lock: dns [Pigs in space]: 34
|
|
|
|
unlock: dns [Pigs in space]: 35
|
2008-03-11 18:58:52 -04:00
|
|
|
CLEANUP
|
2019-09-27 03:41:43 -04:00
|
|
|
lock: cookie [Pigs in space]: 36
|
|
|
|
unlock: cookie [Pigs in space]: 37
|
2017-12-09 17:50:05 -05:00
|
|
|
lock: share [Pigs in space]: 38
|
|
|
|
unlock: share [Pigs in space]: 39
|
2019-09-27 03:41:43 -04:00
|
|
|
*** run 2
|
|
|
|
CURLOPT_SHARE
|
|
|
|
lock: share [Pigs in space]: 40
|
|
|
|
unlock: share [Pigs in space]: 41
|
2003-08-11 02:44:46 -04:00
|
|
|
PERFORM
|
2013-01-17 06:59:23 -05:00
|
|
|
lock: cookie [Pigs in space]: 42
|
|
|
|
unlock: cookie [Pigs in space]: 43
|
2019-09-27 03:41:43 -04:00
|
|
|
lock: dns [Pigs in space]: 44
|
|
|
|
unlock: dns [Pigs in space]: 45
|
2017-12-09 17:50:05 -05:00
|
|
|
lock: cookie [Pigs in space]: 46
|
|
|
|
unlock: cookie [Pigs in space]: 47
|
2019-09-27 03:41:43 -04:00
|
|
|
lock: cookie [Pigs in space]: 48
|
|
|
|
unlock: cookie [Pigs in space]: 49
|
|
|
|
lock: cookie [Pigs in space]: 50
|
|
|
|
unlock: cookie [Pigs in space]: 51
|
2013-06-17 17:28:35 -04:00
|
|
|
run 2: set cookie 4 and 5
|
2019-09-27 03:41:43 -04:00
|
|
|
lock: dns [Pigs in space]: 52
|
|
|
|
unlock: dns [Pigs in space]: 53
|
|
|
|
lock: dns [Pigs in space]: 54
|
|
|
|
unlock: dns [Pigs in space]: 55
|
2003-08-11 02:44:46 -04:00
|
|
|
CLEANUP
|
2019-09-27 03:41:43 -04:00
|
|
|
lock: cookie [Pigs in space]: 56
|
|
|
|
unlock: cookie [Pigs in space]: 57
|
|
|
|
lock: share [Pigs in space]: 58
|
|
|
|
unlock: share [Pigs in space]: 59
|
2013-06-17 17:28:35 -04:00
|
|
|
*** run 3
|
|
|
|
CURLOPT_SHARE
|
2019-09-27 03:41:43 -04:00
|
|
|
lock: share [Pigs in space]: 60
|
|
|
|
unlock: share [Pigs in space]: 61
|
2013-06-17 17:28:35 -04:00
|
|
|
CURLOPT_COOKIEJAR
|
|
|
|
CURLOPT_COOKIELIST FLUSH
|
|
|
|
lock: cookie [Pigs in space]: 62
|
|
|
|
unlock: cookie [Pigs in space]: 63
|
2019-09-27 03:41:43 -04:00
|
|
|
PERFORM
|
|
|
|
lock: dns [Pigs in space]: 64
|
|
|
|
unlock: dns [Pigs in space]: 65
|
2014-09-25 10:25:52 -04:00
|
|
|
lock: cookie [Pigs in space]: 66
|
|
|
|
unlock: cookie [Pigs in space]: 67
|
2017-12-09 17:50:05 -05:00
|
|
|
lock: cookie [Pigs in space]: 68
|
|
|
|
unlock: cookie [Pigs in space]: 69
|
2016-10-03 00:34:59 -04:00
|
|
|
lock: cookie [Pigs in space]: 70
|
|
|
|
unlock: cookie [Pigs in space]: 71
|
2019-09-27 03:41:43 -04:00
|
|
|
lock: cookie [Pigs in space]: 72
|
|
|
|
unlock: cookie [Pigs in space]: 73
|
|
|
|
lock: cookie [Pigs in space]: 74
|
|
|
|
unlock: cookie [Pigs in space]: 75
|
2017-12-09 17:50:05 -05:00
|
|
|
run 3: overwrite cookie 1 and 4, set cookie 6 with and without tailmatch
|
2019-09-27 03:41:43 -04:00
|
|
|
lock: dns [Pigs in space]: 76
|
|
|
|
unlock: dns [Pigs in space]: 77
|
|
|
|
lock: dns [Pigs in space]: 78
|
|
|
|
unlock: dns [Pigs in space]: 79
|
2017-12-09 17:50:05 -05:00
|
|
|
CLEANUP
|
2019-09-27 03:41:43 -04:00
|
|
|
lock: cookie [Pigs in space]: 80
|
|
|
|
unlock: cookie [Pigs in space]: 81
|
|
|
|
lock: share [Pigs in space]: 82
|
|
|
|
unlock: share [Pigs in space]: 83
|
2017-12-09 17:50:05 -05:00
|
|
|
CURLOPT_SHARE
|
2019-09-27 03:41:43 -04:00
|
|
|
lock: share [Pigs in space]: 84
|
|
|
|
unlock: share [Pigs in space]: 85
|
2017-12-09 17:50:05 -05:00
|
|
|
CURLOPT_COOKIELIST ALL
|
|
|
|
lock: cookie [Pigs in space]: 86
|
|
|
|
unlock: cookie [Pigs in space]: 87
|
2019-09-27 03:41:43 -04:00
|
|
|
CURLOPT_COOKIEJAR
|
|
|
|
CURLOPT_COOKIELIST RELOAD
|
|
|
|
lock: cookie [Pigs in space]: 88
|
|
|
|
unlock: cookie [Pigs in space]: 89
|
|
|
|
lock: cookie [Pigs in space]: 90
|
|
|
|
unlock: cookie [Pigs in space]: 91
|
2014-09-25 10:25:52 -04:00
|
|
|
loaded cookies:
|
|
|
|
-----------------
|
2016-10-03 00:34:59 -04:00
|
|
|
www.host.foo.com FALSE / FALSE 1993463787 test6 six_more
|
2018-08-28 05:28:50 -04:00
|
|
|
.www.host.foo.com TRUE / FALSE 1993463787 test6 six
|
|
|
|
.host.foo.com TRUE / FALSE 1896263787 test5 five
|
|
|
|
.host.foo.com TRUE / FALSE 2061978987 test4 overwritten4
|
|
|
|
.foo.com TRUE / FALSE 1896263787 test3 three
|
|
|
|
.host.foo.com TRUE / FALSE 1896263787 test2 two
|
|
|
|
.foo.com TRUE / FALSE 1993463787 test1 overwritten1
|
|
|
|
.host.foo.com TRUE / FALSE 1896263787 injected yes
|
2014-09-25 10:25:52 -04:00
|
|
|
-----------------
|
|
|
|
try SHARE_CLEANUP...
|
2017-12-09 17:50:05 -05:00
|
|
|
lock: share [Pigs in space]: 92
|
|
|
|
unlock: share [Pigs in space]: 93
|
2019-09-27 03:41:43 -04:00
|
|
|
SHARE_CLEANUP failed, correct
|
|
|
|
CLEANUP
|
|
|
|
lock: cookie [Pigs in space]: 94
|
|
|
|
unlock: cookie [Pigs in space]: 95
|
|
|
|
lock: share [Pigs in space]: 96
|
|
|
|
unlock: share [Pigs in space]: 97
|
2017-09-18 18:50:16 -04:00
|
|
|
SHARE_CLEANUP
|
2019-09-27 03:41:43 -04:00
|
|
|
lock: share [Pigs in space]: 98
|
|
|
|
unlock: share [Pigs in space]: 99
|
2003-08-11 02:44:46 -04:00
|
|
|
GLOBAL_CLEANUP
|
|
|
|
</stdout>
|
2005-06-03 10:06:03 -04:00
|
|
|
<file name="log/jar506" mode="text">
|
2003-08-11 02:44:46 -04:00
|
|
|
# Netscape HTTP Cookie File
|
2020-11-04 08:02:01 -05:00
|
|
|
# https://curl.se/docs/http-cookies.html
|
2003-08-11 02:44:46 -04:00
|
|
|
# This file was generated by libcurl! Edit at your own risk.
|
|
|
|
|
2016-10-03 00:34:59 -04:00
|
|
|
www.host.foo.com FALSE / FALSE 1993463787 test6 six_more
|
2018-08-28 05:28:50 -04:00
|
|
|
.www.host.foo.com TRUE / FALSE 1993463787 test6 six
|
|
|
|
.host.foo.com TRUE / FALSE 1896263787 test5 five
|
|
|
|
.host.foo.com TRUE / FALSE 2061978987 test4 overwritten4
|
|
|
|
.foo.com TRUE / FALSE 1896263787 test3 three
|
|
|
|
.host.foo.com TRUE / FALSE 1896263787 test2 two
|
|
|
|
.foo.com TRUE / FALSE 1993463787 test1 overwritten1
|
|
|
|
.host.foo.com TRUE / FALSE 1896263787 injected yes
|
2003-08-11 02:44:46 -04:00
|
|
|
</file>
|
|
|
|
</verify>
|
2007-01-22 21:25:56 -05:00
|
|
|
</testcase>
|