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: Thu, 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<server> 23http 24</server> 25 <name> 26HTTP RFC1867-type formposting with filename/data contains ',', ';', '"' 27 </name> 28 <command> 29http://%HOSTIP:%HTTPPORT/we/want/1133 -F "file=@\"log/test1133,and;.txt\";type=mo/foo;filename=\"faker,and;.txt\"" -F 'file2=@"log/test1133,and;.txt"' -F 'file3=@"log/test1133,and;.txt";type=m/f,"log/test1133,and;.txt"' -F a="{\"field1\":\"value1\",\"field2\":\"value2\"}" -F 'b=" \\value1;type=\"whatever\" "; type=text/foo; charset=utf-8 ; filename=param_b' 30</command> 31# We create this file before the command is invoked! 32<file name="log/test1133,and;.txt"> 33foo bar 34This is a bar foo 35bar 36foo 37</file> 38</client> 39 40# Verify data after the test has been "shot" 41<verify> 42<strip> 43^(Content-Type: multipart/form-data;|Content-Type: multipart/mixed; boundary=|-------).* 44</strip> 45<protocol> 46POST /we/want/1133 HTTP/1.1 47Host: %HOSTIP:%HTTPPORT 48User-Agent: curl/%VERSION 49Accept: */* 50Content-Length: 1264 51Content-Type: multipart/form-data; boundary=----------------------------24e78000bd32 52 53------------------------------24e78000bd32 54Content-Disposition: form-data; name="file"; filename="faker,and;.txt" 55Content-Type: mo/foo 56 57foo bar 58This is a bar foo 59bar 60foo 61 62------------------------------24e78000bd32 63Content-Disposition: form-data; name="file2"; filename="test1133,and;.txt" 64Content-Type: text/plain 65 66foo bar 67This is a bar foo 68bar 69foo 70 71------------------------------24e78000bd32 72Content-Disposition: form-data; name="file3" 73Content-Type: multipart/mixed; boundary=----------------------------7f0e85a48b0b 74 75Content-Disposition: attachment; filename="test1133,and;.txt" 76Content-Type: m/f 77 78foo bar 79This is a bar foo 80bar 81foo 82 83Content-Disposition: attachment; filename="test1133,and;.txt" 84Content-Type: text/plain 85 86foo bar 87This is a bar foo 88bar 89foo 90 91 92Content-Disposition: form-data; name="a" 93 94{"field1":"value1","field2":"value2"} 95Content-Disposition: form-data; name="b"; filename="param_b" 96Content-Type: text/foo; charset=utf-8 97 98 \value1;type="whatever" 99------------------------------24e78000bd32-- 100</protocol> 101</verify> 102</testcase> 103