1<testcase> 2# Server-side 3<reply> 4<data> 5HTTP/1.1 200 OK swsclose 6Date: Thu, 09 Nov 2010 14:49:00 GMT 7Server: test-server/fake 8Content-Length: 10 9 10blablabla 11</data> 12</reply> 13 14# Client-side 15<client> 16<server> 17http 18</server> 19 <name> 20HTTP formpost a file with spaces in name 21 </name> 22 <command> 23http://%HOSTIP:%HTTPPORT/we/want/166 -F "name=@log/fie ld 166" 24</command> 25# We create this file before the command is invoked! 26<file name="log/fie ld 166"> 27data inside the file 28</file> 29</client> 30 31# Verify data after the test has been "shot" 32<verify> 33<strip> 34^(User-Agent:|Content-Type: multipart/form-data;|------------).* 35</strip> 36<protocol> 37POST /we/want/166 HTTP/1.1 38User-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 39Host: %HOSTIP:%HTTPPORT 40Accept: */* 41Content-Length: 223 42Expect: 100-continue 43Content-Type: multipart/form-data; boundary=----------------------------b0b3d6d23991 44 45------------------------------b0b3d6d23991 46Content-Disposition: form-data; name="name"; filename="fie ld 166" 47Content-Type: application/octet-stream 48 49data inside the file 50 51------------------------------b0b3d6d23991-- 52</protocol> 53</verify> 54</testcase> 55