Revert "Update to 7.40.1"
[platform/upstream/curl.git] / tests / data / test1105
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: Thu, 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
23 </data>
24 </reply>
25
26 # Client-side
27 <client>
28 <server>
29 http
30 </server>
31  <name>
32 HTTP 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>
38 perl -e 'if ("%HOSTIP" !~ /127\.0\.0\.1$/) {print "Test only works for HOSTIP 127.0.0.1"; exit(1)}'
39 </precheck>
40 </client>
41
42 # Verify data after the test has been "shot"
43 <verify>
44 <strip>
45 ^User-Agent:.*
46 </strip>
47 <protocol nonewline="yes">
48 POST /we/want/1105?parm1=this*that/other/thing&parm2=foobar/1105 HTTP/1.1\r
49 Host: %HOSTIP:%HTTPPORT\r
50 Accept: */*\r
51 Content-Length: 33\r
52 Content-Type: application/x-www-form-urlencoded\r
53 \r
54 userid=myname&password=mypassword
55 </protocol>
56 <file name="log/cookie1105.txt" mode="text">
57 # Netscape HTTP Cookie File
58 # http://curl.haxx.se/docs/http-cookies.html
59 # This file was generated by libcurl! Edit at your own risk.
60
61 127.0.0.1       FALSE   /we/want/       FALSE   0       foobar  name
62 .127.0.0.1      TRUE    "/silly/"       FALSE   0       mismatch        this
63 .0.0.1  TRUE    /       FALSE   0       partmatch       present
64 </file>
65 </verify>
66 </testcase>