1 <testcase> 2 <info> 3 <keywords> 4 HTTP 5 HTTP POST 6 </keywords> 7 </info> 8 9 # Server-side 10 <reply> 11 <data> 12 HTTP/1.1 200 OK swsclose 13 Date: Thu, 09 Nov 2010 14:49:00 GMT 14 Server: test-server/fake 15 Content-Length: 10 16 17 blablabla 18 </data> 19 </reply> 20 21 # Client-side 22 <client> 23 <server> 24 http 25 </server> 26 <name> 27 HTTP formpost a file with spaces in name 28 </name> 29 <command> 30 http://%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"> 34 data 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> 44 POST /we/want/166 HTTP/1.1 45 User-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 46 Host: %HOSTIP:%HTTPPORT 47 Accept: */* 48 Content-Length: 223 49 Expect: 100-continue 50 Content-Type: multipart/form-data; boundary=----------------------------b0b3d6d23991 51 52 ------------------------------b0b3d6d23991 53 Content-Disposition: form-data; name="name"; filename="fie ld 166" 54 Content-Type: application/octet-stream 55 56 data inside the file 57 58 ------------------------------b0b3d6d23991-- 59 </protocol> 60 </verify> 61 </testcase> 62