1<testcase>
2<info>
3<keywords>
4HTTP
5HTTP POST
6</keywords>
7</info>
8
9# Server-side
10<reply>
11<data>
12HTTP/1.1 200 OK swsclose
13Date: Thu, 09 Nov 2010 14:49:00 GMT
14Server: test-server/fake
15Content-Length: 10
16
17blablabla
18</data>
19</reply>
20
21# Client-side
22<client>
23<server>
24http
25</server>
26 <name>
27HTTP multipart formpost with contents from a file
28 </name>
29 <command>
30http://%HOSTIP:%HTTPPORT/we/want/163 -F "name=<log/field163" -F tool=curl
31</command>
32# We create this file before the command is invoked!
33<file name="log/field163">
34contents
35from
36a
37file
38
39newlinens?
40yes please
41        
42[tab][CR] too
43</file>
44</client>
45
46# Verify data after the test has been "shot"
47<verify>
48<strip>
49^(User-Agent:|Content-Type: multipart/form-data;|------------).*
50</strip>
51<protocol>
52POST /we/want/163 HTTP/1.1
53User-Agent: curl/7.11.2-CVS (i686-pc-linux-gnu) libcurl/7.11.2-CVS OpenSSL/0.9.6b zlib/1.1.4 c-ares/1.0.0
54Host: %HOSTIP:%HTTPPORT
55Accept: */*
56Content-Length: 304
57Expect: 100-continue
58Content-Type: multipart/form-data; boundary=----------------------------c2d1767eb6ac
59
60------------------------------c2d1767eb6ac
61Content-Disposition: form-data; name="name"
62
63contents
64from
65a
66file
67
68newlinens?
69yes please
70        
71[tab][CR] too
72
73------------------------------c2d1767eb6ac
74Content-Disposition: form-data; name="tool"
75
76curl
77------------------------------c2d1767eb6ac--
78</protocol>
79</verify>
80</testcase>
81