xref: /curl/tests/data/test1105 (revision 3fd80c7b)
1<testcase>
2<info>
3<keywords>
4HTTP
5HTTP POST
6cookies
7cookiejar
8</keywords>
9</info>
10
11# Server-side
12<reply>
13<data>
14HTTP/1.1 200 OK
15Date: Tue, 09 Nov 2010 14:49:00 GMT
16Server: test-server/fake
17Content-Type: text/html
18Funny-head: yesyes swsclose
19Set-Cookie: foobar=name;
20Set-Cookie: mismatch=this; domain=127.0.0.1; path="/silly/";
21Set-Cookie: partmatch=present; domain=.0.0.1; path=/;
22Set-Cookie: foo	bar=barfoo
23Set-Cookie: bar	foo=
24Set-Cookie: bar=foo	bar
25
26</data>
27</reply>
28
29# Client-side
30<client>
31<server>
32http
33</server>
34<name>
35HTTP with cookie parser and header recording
36</name>
37<command>
38"http://%HOSTIP:%HTTPPORT/we/want/%TESTNUMBER?parm1=this*that/other/thing&parm2=foobar/%TESTNUMBER" -c %LOGDIR/cookie%TESTNUMBER.txt -d "userid=myname&password=mypassword"
39</command>
40<precheck>
41perl -e "print 'Test requires default test server host' if ( '%HOSTIP' ne '127.0.0.1' );"
42</precheck>
43<features>
44cookies
45</features>
46</client>
47
48# Verify data after the test has been "shot"
49<verify>
50<protocol nonewline="yes">
51POST /we/want/%TESTNUMBER?parm1=this*that/other/thing&parm2=foobar/%TESTNUMBER HTTP/1.1
52Host: %HOSTIP:%HTTPPORT
53User-Agent: curl/%VERSION
54Accept: */*
55Content-Length: 33
56Content-Type: application/x-www-form-urlencoded
57
58userid=myname&password=mypassword
59</protocol>
60<file name="%LOGDIR/cookie%TESTNUMBER.txt" mode="text">
61# Netscape HTTP Cookie File
62# https://curl.se/docs/http-cookies.html
63# This file was generated by libcurl! Edit at your own risk.
64
65127.0.0.1	FALSE	"/silly/"	FALSE	0	mismatch	this
66127.0.0.1	FALSE	/we/want/	FALSE	0	foobar	name
67</file>
68</verify>
69</testcase>
70