1<testcase> 2<info> 3<keywords> 4HTTP 5HTTP FORMPOST 6HTTP file upload 7</keywords> 8</info> 9# Server-side 10<reply> 11<data> 12HTTP/1.0 200 OK swsclose 13Date: Thu, 09 Nov 2010 14:49:00 GMT 14Server: test-server/fake 15 16blablabla 17 18</data> 19</reply> 20 21# Client-side 22<client> 23<server> 24http 25</server> 26 <name> 27HTTP RFC1867-type formposting 28 </name> 29 <command> 30http://%HOSTIP:%HTTPPORT/we/want/9 -F name=daniel -F tool=curl -F file=@log/test9.txt 31</command> 32# We create this file before the command is invoked! 33<file name="log/test9.txt"> 34foo- 35This is a moo- 36bar 37</file> 38</client> 39 40# Verify data after the test has been "shot" 41<verify> 42<strip> 43^(Content-Type: multipart/form-data;|------------).* 44</strip> 45<protocol> 46POST /we/want/9 HTTP/1.1 47Host: %HOSTIP:%HTTPPORT 48User-Agent: curl/%VERSION 49Accept: */* 50Content-Length: 407 51Content-Type: multipart/form-data; boundary=----------------------------9ef8d6205763 52 53------------------------------9ef8d6205763 54Content-Disposition: form-data; name="name" 55 56daniel 57------------------------------9ef8d6205763 58Content-Disposition: form-data; name="tool" 59 60curl 61------------------------------9ef8d6205763 62Content-Disposition: form-data; name="file"; filename="test9.txt" 63Content-Type: text/plain 64 65foo- 66This is a moo- 67bar 68 69------------------------------9ef8d6205763-- 70</protocol> 71</verify> 72</testcase> 73