⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 test506

📁 THIS IS HTTP CURL Example
💻
字号:
<testcase><info><keywords>HTTPHTTP GETcookiesshared cookies</keywords></info># Server-side<reply><data1>HTTP/1.1 200 OKDate: Thu, 09 Nov 2010 14:49:00 GMTServer: test-server/fakeContent-Type: text/htmlSet-Cookie: test1=one; domain=foo.com; expires=Sat Feb 2 11:56:27 GMT 2030Set-Cookie: test2=two; domain=host.foo.com; expires=Sat Feb 2 11:56:27 GMT 2030Set-Cookie: test3=three; domain=foo.com; expires=Sat Feb 2 11:56:27 GMT 2030Content-Length: 29run 1: set cookie 1, 2 and 3</data1><data2>HTTP/1.1 200 OKDate: Thu, 09 Nov 2010 14:49:01 GMTServer: test-server/fakeContent-Type: text/htmlSet-Cookie: test4=four; domain=host.foo.com; expires=Sat Feb 2 11:56:27 GMT 2030Set-Cookie: test5=five; domain=host.foo.com; expires=Sat Feb 2 11:56:27 GMT 2030Content-Length: 26run 2: set cookie 4 and 5</data2><data3>HTTP/1.1 200 OKDate: Thu, 09 Nov 2010 14:49:02 GMTServer: test-server/fakeContent-Type: text/htmlFunny-head: yesyesSet-Cookie: test4=overwritten4; domain=host.foo.com; expires=Sat May 5 GMT 11:56:27 2035Set-Cookie: test1=overwritten1; domain=foo.com; expires=Thu Mar 3 GMT 11:56:27 2033Content-Type: text/htmlContent-Length: 32run 3: overwrite cookie 1 and 4</data3></reply># Client-side<client><server>http</server><name>HTTP with shared cookie list (and dns cache)</name># 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><tool>lib506</tool><command>http://%HOSTIP:%HTTPPORT/506</command></client># Verify data after the test has been "shot"<verify><stdout mode="text">GLOBAL_INITSHARE_INITCURLSHOPT_LOCKFUNCCURLSHOPT_UNLOCKFUNCCURLSHOPT_USERDATACURL_LOCK_DATA_COOKIECURL_LOCK_DATA_DNS*** run 1CURLOPT_SHARElock:   share  <Pigs in space>: 0unlock: share  <Pigs in space>: 1PERFORMlock:   dns    <Pigs in space>: 2unlock: dns    <Pigs in space>: 3lock:   dns    <Pigs in space>: 4unlock: dns    <Pigs in space>: 5lock:   cookie <Pigs in space>: 6unlock: cookie <Pigs in space>: 7lock:   cookie <Pigs in space>: 8unlock: cookie <Pigs in space>: 9lock:   cookie <Pigs in space>: 10unlock: cookie <Pigs in space>: 11lock:   cookie <Pigs in space>: 12unlock: cookie <Pigs in space>: 13run 1: set cookie 1, 2 and 3lock:   dns    <Pigs in space>: 14unlock: dns    <Pigs in space>: 15CLEANUPlock:   dns    <Pigs in space>: 16unlock: dns    <Pigs in space>: 17lock:   cookie <Pigs in space>: 18unlock: cookie <Pigs in space>: 19lock:   share  <Pigs in space>: 20unlock: share  <Pigs in space>: 21*** run 2CURLOPT_SHARElock:   share  <Pigs in space>: 22unlock: share  <Pigs in space>: 23PERFORMlock:   dns    <Pigs in space>: 24unlock: dns    <Pigs in space>: 25lock:   dns    <Pigs in space>: 26unlock: dns    <Pigs in space>: 27lock:   cookie <Pigs in space>: 28unlock: cookie <Pigs in space>: 29lock:   cookie <Pigs in space>: 30unlock: cookie <Pigs in space>: 31lock:   cookie <Pigs in space>: 32unlock: cookie <Pigs in space>: 33run 2: set cookie 4 and 5lock:   dns    <Pigs in space>: 34unlock: dns    <Pigs in space>: 35CLEANUPlock:   dns    <Pigs in space>: 36unlock: dns    <Pigs in space>: 37lock:   cookie <Pigs in space>: 38unlock: cookie <Pigs in space>: 39lock:   share  <Pigs in space>: 40unlock: share  <Pigs in space>: 41*** run 3CURLOPT_SHARElock:   share  <Pigs in space>: 42unlock: share  <Pigs in space>: 43CURLOPT_COOKIEJARPERFORMlock:   dns    <Pigs in space>: 44unlock: dns    <Pigs in space>: 45lock:   dns    <Pigs in space>: 46unlock: dns    <Pigs in space>: 47lock:   cookie <Pigs in space>: 48unlock: cookie <Pigs in space>: 49lock:   cookie <Pigs in space>: 50unlock: cookie <Pigs in space>: 51lock:   cookie <Pigs in space>: 52unlock: cookie <Pigs in space>: 53run 3: overwrite cookie 1 and 4lock:   dns    <Pigs in space>: 54unlock: dns    <Pigs in space>: 55try SHARE_CLEANUP...lock:   share  <Pigs in space>: 56unlock: share  <Pigs in space>: 57SHARE_CLEANUP failed, correctCLEANUPlock:   dns    <Pigs in space>: 58unlock: dns    <Pigs in space>: 59lock:   cookie <Pigs in space>: 60unlock: cookie <Pigs in space>: 61lock:   share  <Pigs in space>: 62unlock: share  <Pigs in space>: 63SHARE_CLEANUPlock:   share  <Pigs in space>: 64unlock: share  <Pigs in space>: 65GLOBAL_CLEANUP</stdout><stderr>http://%HOSTIP:%HTTPPORT/506 </stderr><file name="log/jar506" mode="text"># Netscape HTTP Cookie File# http://curlm.haxx.se/rfc/cookie_spec.html# This file was generated by libcurl! Edit at your own risk..foo.com	TRUE	/	FALSE	1993463787	test1	overwritten1.host.foo.com	TRUE	/	FALSE	1896263787	test2	two.foo.com	TRUE	/	FALSE	1896263787	test3	three.host.foo.com	TRUE	/	FALSE	2061978987	test4	overwritten4.host.foo.com	TRUE	/	FALSE	1896263787	test5	five</file></verify></testcase>

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -