5cd4b8c3427c6658e29346030949d62d299bb868
[platform/upstream/curl.git] / tests / data / test508
1 <testcase>
2 #
3 # Server-side
4 <reply>
5 <data mode="text">
6 HTTP/1.1 200 OK
7 Date: Thu, 09 Nov 2010 14:49:00 GMT
8 Server: test-server/fake swsclose
9 Connection: close
10 Content-Type: text/html
11
12 hello
13 </data>
14 </reply>
15
16 # Client-side
17 <client>
18 <server>
19 http
20 </server>
21 # tool is what to use instead of 'curl'
22 <tool>
23 lib508
24 </tool>
25
26  <name>
27 send HTTP POST using read callback
28  </name>
29  <command>
30 http://%HOSTIP:%HTTPPORT/508
31 </command>
32 </client>
33
34 #
35 # Verify data after the test has been "shot"
36 <verify>
37 <strippart>
38 # remove CR that CURLOPT_TRANSFERTEXT added, when CharConv enabled:
39 s/^(this is what we post to the silly web server)\r\n/$1\n/ if($has_charconv)
40 </strippart>
41 <protocol>
42 POST /508 HTTP/1.1\r
43 Host: %HOSTIP:%HTTPPORT\r
44 Accept: */*\r
45 Content-Length: 45\r
46 Content-Type: application/x-www-form-urlencoded\r
47 \r
48 this is what we post to the silly web server
49 </protocol>
50 </verify>
51 </testcase>