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: Thu, 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=/; 22 23</data> 24</reply> 25 26# Client-side 27<client> 28<server> 29http 30</server> 31 <name> 32HTTP with cookie parser and header recording 33 </name> 34 <command> 35"http://%HOSTIP:%HTTPPORT/we/want/1105?parm1=this*that/other/thing&parm2=foobar/1105" -c log/cookie1105.txt -d "userid=myname&password=mypassword" 36</command> 37<precheck> 38perl -e "print 'Test requires default test server host' if ( '%HOSTIP' ne '127.0.0.1' );" 39</precheck> 40</client> 41 42# Verify data after the test has been "shot" 43<verify> 44<protocol nonewline="yes"> 45POST /we/want/1105?parm1=this*that/other/thing&parm2=foobar/1105 HTTP/1.1 46Host: %HOSTIP:%HTTPPORT 47User-Agent: curl/%VERSION 48Accept: */* 49Content-Length: 33 50Content-Type: application/x-www-form-urlencoded 51 52userid=myname&password=mypassword 53</protocol> 54<file name="log/cookie1105.txt" mode="text"> 55# Netscape HTTP Cookie File 56# https://curl.haxx.se/docs/http-cookies.html 57# This file was generated by libcurl! Edit at your own risk. 58 59127.0.0.1 FALSE "/silly/" FALSE 0 mismatch this 60127.0.0.1 FALSE /we/want/ FALSE 0 foobar name 61</file> 62</verify> 63</testcase> 64