1<testcase> 2<info> 3<keywords> 4HTTP 5HTTP POST 6</keywords> 7</info> 8 9# Server-side 10<reply> 11<data> 12HTTP/1.1 200 OK swsclose 13Date: Thu, 09 Nov 2010 14:49:00 GMT 14Server: test-server/fake 15Content-Length: 11 16 17blablabla 18 19</data> 20</reply> 21 22# Client-side 23<client> 24<server> 25http 26</server> 27 <name> 28HTTP RFC1867-formpost a file from stdin with "faked" filename 29 </name> 30 <command> 31http://%HOSTIP:%HTTPPORT/we/want/173 -F field1=contents1 -F "fileupload=@-;filename=/dev/null;type=text/x-null;format=x-curl" 32</command> 33 34<stdin> 35line1 36line2 37line3 38line4 39line5 40line6 41line7 42line8 43</stdin> 44</client> 45 46# Verify data after the test has been "shot" 47<verify> 48<strip> 49^(User-Agent:|Content-Type: multipart/form-data;|------------).* 50</strip> 51<protocol> 52POST /we/want/173 HTTP/1.1 53User-Agent: curl/7.12.1-CVS (i686-pc-linux-gnu) libcurl/7.12.1-CVS OpenSSL/0.9.6b ipv6 zlib/1.1.4 GSS libidn/0.4.6 54Host: %HOSTIP:%HTTPPORT 55Accept: */* 56Content-Length: 360 57Content-Type: multipart/form-data; boundary=----------------------------5dbea401cd8c 58 59------------------------------5dbea401cd8c 60Content-Disposition: form-data; name="field1" 61 62contents1 63------------------------------5dbea401cd8c 64Content-Disposition: form-data; name="fileupload"; filename="/dev/null" 65Content-Type: text/x-null;format=x-curl 66 67line1 68line2 69line3 70line4 71line5 72line6 73line7 74line8 75 76------------------------------5dbea401cd8c-- 77</protocol> 78</verify> 79</testcase> 80