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 multipart formpost with contents from a file 21 </name> 22 <command> 23http://%HOSTIP:%HTTPPORT/we/want/163 -F "name=<log/field163" -F tool=curl 24</command> 25# We create this file before the command is invoked! 26<file name="log/field163"> 27contents 28from 29a 30file 31 32newlinens? 33yes please 34 35[tab][CR] too 36</file> 37</client> 38 39# Verify data after the test has been "shot" 40<verify> 41<strip> 42^(User-Agent:|Content-Type: multipart/form-data;|------------).* 43</strip> 44<protocol> 45POST /we/want/163 HTTP/1.1 46User-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 47Host: %HOSTIP:%HTTPPORT 48Accept: */* 49Content-Length: 304 50Expect: 100-continue 51Content-Type: multipart/form-data; boundary=----------------------------c2d1767eb6ac 52 53------------------------------c2d1767eb6ac 54Content-Disposition: form-data; name="name" 55 56contents 57from 58a 59file 60 61newlinens? 62yes please 63 64[tab][CR] too 65 66------------------------------c2d1767eb6ac 67Content-Disposition: form-data; name="tool" 68 69curl 70------------------------------c2d1767eb6ac-- 71</protocol> 72</verify> 73</testcase> 74