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 formpost a file with spaces in name
28 </name>
29 <command>
30http://%HOSTIP:%HTTPPORT/we/want/166 -F "name=@log/fie ld 166"
31</command>
32# We create this file before the command is invoked!
33<file name="log/fie ld 166">
34data inside the file
35</file>
36</client>
37
38# Verify data after the test has been "shot"
39<verify>
40<strip>
41^(User-Agent:|Content-Type: multipart/form-data;|------------).*
42</strip>
43<protocol>
44POST /we/want/166 HTTP/1.1
45User-Agent: curl/7.12.0-CVS (i686-pc-linux-gnu) libcurl/7.12.0-CVS OpenSSL/0.9.6b zlib/1.1.4 c-ares/1.2.0 libidn/0.4.3
46Host: %HOSTIP:%HTTPPORT
47Accept: */*
48Content-Length: 223
49Expect: 100-continue
50Content-Type: multipart/form-data; boundary=----------------------------b0b3d6d23991
51
52------------------------------b0b3d6d23991
53Content-Disposition: form-data; name="name"; filename="fie ld 166"
54Content-Type: application/octet-stream
55
56data inside the file
57
58------------------------------b0b3d6d23991--
59</protocol>
60</verify>
61</testcase>
62