blob: 396933838235a2b3b31586b91002f2b63533a446 [file] [log] [blame]
xf.li6c8fc1e2023-08-12 00:11:09 -07001<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 log/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</client>
44
45# Verify data after the test has been "shot"
46<verify>
47<protocol nonewline="yes">
48POST /we/want/%TESTNUMBER?parm1=this*that/other/thing&parm2=foobar/%TESTNUMBER HTTP/1.1
49Host: %HOSTIP:%HTTPPORT
50User-Agent: curl/%VERSION
51Accept: */*
52Content-Length: 33
53Content-Type: application/x-www-form-urlencoded
54
55userid=myname&password=mypassword
56</protocol>
57<file name="log/cookie%TESTNUMBER.txt" mode="text">
58# Netscape HTTP Cookie File
59# https://curl.se/docs/http-cookies.html
60# This file was generated by libcurl! Edit at your own risk.
61
62127.0.0.1 FALSE "/silly/" FALSE 0 mismatch this
63127.0.0.1 FALSE /we/want/ FALSE 0 foobar name
64</file>
65</verify>
66</testcase>