1<testcase> 2<info> 3<keywords> 4HTTP 5HTTP FORMPOST 6</keywords> 7</info> 8# Server-side 9<reply> 10<data> 11HTTP/1.1 200 OK 12Date: Tue, 09 Nov 2010 14:49:00 GMT 13Server: test-server/fake 14Content-Length: 10 15 16blablabla 17</data> 18</reply> 19 20# Client-side 21<client> 22<features> 23Mime 24</features> 25<server> 26http 27</server> 28<name> 29HTTP RFC1867-type formposting with filename/data contains ',', ';', '"' 30</name> 31<command> 32http://%HOSTIP:%HTTPPORT/we/want/%TESTNUMBER -F "file=@\"%LOGDIR/test%TESTNUMBER,and;.txt\";type=mo/foo;filename=\"faker,and;.txt\"" -F 'file2=@"%LOGDIR/test%TESTNUMBER,and;.txt"' -F 'file3=@"%LOGDIR/test%TESTNUMBER,and;.txt";type=m/f,"%LOGDIR/test%TESTNUMBER,and;.txt"' -F a="{\"field1\":\"value1\",\"field2\":\"value2\"}" -F 'b=" \\value1;type=\"whatever\" "; type=text/foo; charset=utf-8 ; filename=param_b' 33</command> 34# We create this file before the command is invoked! 35<file name="%LOGDIR/test%TESTNUMBER,and;.txt"> 36foo bar 37This is a bar foo 38bar 39foo 40</file> 41</client> 42 43# Verify data after the test has been "shot" 44<verify> 45<strip> 46^(Content-Type: multipart/form-data;|Content-Type: multipart/mixed; boundary=|-------).* 47</strip> 48<protocol> 49POST /we/want/%TESTNUMBER HTTP/1.1 50Host: %HOSTIP:%HTTPPORT 51User-Agent: curl/%VERSION 52Accept: */* 53Content-Length: 1324 54Content-Type: multipart/form-data; boundary=----------------------------24e78000bd32 55 56------------------------------24e78000bd32 57Content-Disposition: form-data; name="file"; filename="faker,and;.txt" 58Content-Type: mo/foo 59 60foo bar 61This is a bar foo 62bar 63foo 64 65------------------------------24e78000bd32 66Content-Disposition: form-data; name="file2"; filename="test%TESTNUMBER,and;.txt" 67Content-Type: text/plain 68 69foo bar 70This is a bar foo 71bar 72foo 73 74------------------------------24e78000bd32 75Content-Disposition: form-data; name="file3" 76Content-Type: multipart/mixed; boundary=----------------------------7f0e85a48b0b 77 78Content-Disposition: attachment; filename="test%TESTNUMBER,and;.txt" 79Content-Type: m/f 80 81foo bar 82This is a bar foo 83bar 84foo 85 86Content-Disposition: attachment; filename="test%TESTNUMBER,and;.txt" 87Content-Type: text/plain 88 89foo bar 90This is a bar foo 91bar 92foo 93 94 95Content-Disposition: form-data; name="a" 96 97{"field1":"value1","field2":"value2"} 98Content-Disposition: form-data; name="b"; filename="param_b" 99Content-Type: text/foo; charset=utf-8 100 101 \value1;type="whatever" 102------------------------------24e78000bd32-- 103</protocol> 104</verify> 105</testcase> 106