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