xref: /third_party/curl/tests/data/test327 (revision 13498266)
113498266Sopenharmony_ci<testcase>
213498266Sopenharmony_ci<info>
313498266Sopenharmony_ci<keywords>
413498266Sopenharmony_ciHTTP
513498266Sopenharmony_ciHTTP GET
613498266Sopenharmony_cicookies
713498266Sopenharmony_ciheader dump
813498266Sopenharmony_ci</keywords>
913498266Sopenharmony_ci</info>
1013498266Sopenharmony_ci
1113498266Sopenharmony_ci# This test verifies that the cookie file gets created even if the last cookie
1213498266Sopenharmony_ci# has been removed - particularly important when the file is going to be read
1313498266Sopenharmony_ci# again and thus must not contain old contents.
1413498266Sopenharmony_ci
1513498266Sopenharmony_ci# Server-side
1613498266Sopenharmony_ci<reply>
1713498266Sopenharmony_ci<data>
1813498266Sopenharmony_ciHTTP/1.1 200 OK
1913498266Sopenharmony_ciDate: Tue, 09 Nov 2010 14:49:00 GMT
2013498266Sopenharmony_ciServer: test-server/fake
2113498266Sopenharmony_ciContent-Type: text/html
2213498266Sopenharmony_ciFunny-head: yesyes swsclose
2313498266Sopenharmony_ciSet-Cookie: foobar=name; expires=Thu, 22 Nov 2525 10:54:11 GMT;
2413498266Sopenharmony_ci
2513498266Sopenharmony_ci</data>
2613498266Sopenharmony_ci<data2>
2713498266Sopenharmony_ciHTTP/1.1 200 OK
2813498266Sopenharmony_ciDate: Tue, 09 Nov 2010 14:49:00 GMT
2913498266Sopenharmony_ciServer: test-server/fake
3013498266Sopenharmony_ciContent-Type: text/html
3113498266Sopenharmony_ciFunny-head: yesyes swsclose
3213498266Sopenharmony_ciSet-Cookie: foobar=name; expires=Thu, 01 Jan 1970 00:00:00 GMT;
3313498266Sopenharmony_ci
3413498266Sopenharmony_ci</data2>
3513498266Sopenharmony_ci</reply>
3613498266Sopenharmony_ci
3713498266Sopenharmony_ci# Client-side
3813498266Sopenharmony_ci<client>
3913498266Sopenharmony_ci<server>
4013498266Sopenharmony_cihttp
4113498266Sopenharmony_ci</server>
4213498266Sopenharmony_ci<name>
4313498266Sopenharmony_ciHTTP with cookiejar without cookies left
4413498266Sopenharmony_ci</name>
4513498266Sopenharmony_ci<command>
4613498266Sopenharmony_cihttp://%HOSTIP:%HTTPPORT/we/want/%TESTNUMBER -b none -c %LOGDIR/cookies%TESTNUMBER http://%HOSTIP:%HTTPPORT/we/want/%TESTNUMBER0002
4713498266Sopenharmony_ci</command>
4813498266Sopenharmony_ci<features>
4913498266Sopenharmony_cicookies
5013498266Sopenharmony_ci</features>
5113498266Sopenharmony_ci</client>
5213498266Sopenharmony_ci
5313498266Sopenharmony_ci# Verify data after the test has been "shot"
5413498266Sopenharmony_ci<verify>
5513498266Sopenharmony_ci<protocol>
5613498266Sopenharmony_ciGET /we/want/%TESTNUMBER HTTP/1.1
5713498266Sopenharmony_ciHost: %HOSTIP:%HTTPPORT
5813498266Sopenharmony_ciUser-Agent: curl/%VERSION
5913498266Sopenharmony_ciAccept: */*
6013498266Sopenharmony_ci
6113498266Sopenharmony_ciGET /we/want/%TESTNUMBER0002 HTTP/1.1
6213498266Sopenharmony_ciHost: %HOSTIP:%HTTPPORT
6313498266Sopenharmony_ciUser-Agent: curl/%VERSION
6413498266Sopenharmony_ciAccept: */*
6513498266Sopenharmony_ciCookie: foobar=name
6613498266Sopenharmony_ci
6713498266Sopenharmony_ci</protocol>
6813498266Sopenharmony_ci<file name="%LOGDIR/cookies%TESTNUMBER" mode="text">
6913498266Sopenharmony_ci# Netscape HTTP Cookie File
7013498266Sopenharmony_ci# https://curl.se/docs/http-cookies.html
7113498266Sopenharmony_ci# This file was generated by libcurl! Edit at your own risk.
7213498266Sopenharmony_ci
7313498266Sopenharmony_ci</file>
7413498266Sopenharmony_ci</verify>
7513498266Sopenharmony_ci</testcase>
76