xref: /third_party/curl/tests/data/test61 (revision 13498266)
113498266Sopenharmony_ci<testcase>
213498266Sopenharmony_ci<info>
313498266Sopenharmony_ci<keywords>
413498266Sopenharmony_ciHTTP
513498266Sopenharmony_ciHTTP GET
613498266Sopenharmony_cicookies
713498266Sopenharmony_cicookiejar
813498266Sopenharmony_ciHTTP replaced headers
913498266Sopenharmony_cihttponly
1013498266Sopenharmony_ci</keywords>
1113498266Sopenharmony_ci</info>
1213498266Sopenharmony_ci# Server-side
1313498266Sopenharmony_ci<reply>
1413498266Sopenharmony_ci<data>
1513498266Sopenharmony_ciHTTP/1.1 200 OK
1613498266Sopenharmony_ciDate: Tue, 09 Nov 2010 14:49:00 GMT
1713498266Sopenharmony_ciServer: test-server/fake
1813498266Sopenharmony_ciContent-Type: text/html
1913498266Sopenharmony_ciFunny-head: yesyes
2013498266Sopenharmony_ci%if large-time
2113498266Sopenharmony_ciSet-Cookie: test=yes; httponly; domain=foo.com; expires=Fri Feb 13 11:56:27 GMT 2525
2213498266Sopenharmony_ciSET-COOKIE: test2=yes; domain=host.foo.com; expires=Fri Feb 13 11:56:27 GMT 2525
2313498266Sopenharmony_ci%else
2413498266Sopenharmony_ciSet-Cookie: test=yes; httponly; domain=foo.com; expires=Fri Feb 13 11:56:27 GMT 2037
2513498266Sopenharmony_ciSET-COOKIE: test2=yes; domain=host.foo.com; expires=Fri Feb 13 11:56:27 GMT 2037
2613498266Sopenharmony_ci%endif
2713498266Sopenharmony_ciSet-Cookie: test3=maybe; domain=foo.com; path=/moo; secure
2813498266Sopenharmony_ciSet-Cookie: test4=no; domain=nope.foo.com; path=/moo; secure
2913498266Sopenharmony_ciSet-Cookie: test5=name; domain=anything.com; path=/ ; secure
3013498266Sopenharmony_ciSet-Cookie: fake=fooledyou; domain=..com; path=/;
3113498266Sopenharmony_ciSet-Cookie: supercookie=fooledyou; domain=.com; path=/;
3213498266Sopenharmony_ciContent-Length: 4
3313498266Sopenharmony_ci
3413498266Sopenharmony_ciboo
3513498266Sopenharmony_ci</data>
3613498266Sopenharmony_ci</reply>
3713498266Sopenharmony_ci
3813498266Sopenharmony_ci# Client-side
3913498266Sopenharmony_ci<client>
4013498266Sopenharmony_ci<server>
4113498266Sopenharmony_cihttp
4213498266Sopenharmony_ci</server>
4313498266Sopenharmony_ci<name>
4413498266Sopenharmony_ciHTTP with various cookies and custom Host:
4513498266Sopenharmony_ci</name>
4613498266Sopenharmony_ci# Explicitly set the time zone to a known good one, in case the user is
4713498266Sopenharmony_ci# using one of the 'right' zones that take into account leap seconds
4813498266Sopenharmony_ci# which causes the cookie expiry times to be different.
4913498266Sopenharmony_ci<setenv>
5013498266Sopenharmony_ciTZ=GMT
5113498266Sopenharmony_ci</setenv>
5213498266Sopenharmony_ci<command>
5313498266Sopenharmony_cihttp://%HOSTIP:%HTTPPORT/we/want/%TESTNUMBER -c %LOGDIR/jar%TESTNUMBER.txt -H "Host: www.host.foo.com"
5413498266Sopenharmony_ci</command>
5513498266Sopenharmony_ci<features>
5613498266Sopenharmony_cicookies
5713498266Sopenharmony_ci</features>
5813498266Sopenharmony_ci</client>
5913498266Sopenharmony_ci
6013498266Sopenharmony_ci# Verify data after the test has been "shot"
6113498266Sopenharmony_ci<verify>
6213498266Sopenharmony_ci<protocol>
6313498266Sopenharmony_ciGET /we/want/%TESTNUMBER HTTP/1.1
6413498266Sopenharmony_ciHost: www.host.foo.com
6513498266Sopenharmony_ciUser-Agent: curl/%VERSION
6613498266Sopenharmony_ciAccept: */*
6713498266Sopenharmony_ci
6813498266Sopenharmony_ci</protocol>
6913498266Sopenharmony_ci<file name="%LOGDIR/jar%TESTNUMBER.txt" mode="text">
7013498266Sopenharmony_ci# Netscape HTTP Cookie File
7113498266Sopenharmony_ci# https://curl.se/docs/http-cookies.html
7213498266Sopenharmony_ci# This file was generated by libcurl! Edit at your own risk.
7313498266Sopenharmony_ci
7413498266Sopenharmony_ci%if large-time
7513498266Sopenharmony_ci.host.foo.com	TRUE	/we/want/	FALSE	17517902187	test2	yes
7613498266Sopenharmony_ci#HttpOnly_.foo.com	TRUE	/we/want/	FALSE	17517902187	test	yes
7713498266Sopenharmony_ci%else
7813498266Sopenharmony_ci.host.foo.com	TRUE	/we/want/	FALSE	2118138987	test2	yes
7913498266Sopenharmony_ci#HttpOnly_.foo.com	TRUE	/we/want/	FALSE	2118138987	test	yes
8013498266Sopenharmony_ci%endif
8113498266Sopenharmony_ci</file>
8213498266Sopenharmony_ci</verify>
8313498266Sopenharmony_ci</testcase>
84