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: Tue, 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<features> 24Mime 25</features> 26<server> 27http 28</server> 29<name> 30HTTP RFC1867-type formposting 31</name> 32<command> 33http://%HOSTIP:%HTTPPORT/we/want/%TESTNUMBER -F name=daniel -F tool=curl -F file=@%LOGDIR/test%TESTNUMBER.txt 34</command> 35# We create this file before the command is invoked! 36<file name="%LOGDIR/test%TESTNUMBER.txt"> 37foo- 38This is a moo- 39bar 40</file> 41</client> 42 43# Verify data after the test has been "shot" 44<verify> 45<strip> 46^(Content-Type: multipart/form-data;|------------).* 47</strip> 48<protocol> 49POST /we/want/%TESTNUMBER HTTP/1.1 50Host: %HOSTIP:%HTTPPORT 51User-Agent: curl/%VERSION 52Accept: */* 53Content-Length: 431 54Content-Type: multipart/form-data; boundary=----------------------------9ef8d6205763 55 56------------------------------9ef8d6205763 57Content-Disposition: form-data; name="name" 58 59daniel 60------------------------------9ef8d6205763 61Content-Disposition: form-data; name="tool" 62 63curl 64------------------------------9ef8d6205763 65Content-Disposition: form-data; name="file"; filename="test9.txt" 66Content-Type: text/plain 67 68foo- 69This is a moo- 70bar 71 72------------------------------9ef8d6205763-- 73</protocol> 74</verify> 75</testcase> 76