113498266Sopenharmony_ci<testcase> 213498266Sopenharmony_ci<info> 313498266Sopenharmony_ci<keywords> 413498266Sopenharmony_ciHTTP 513498266Sopenharmony_ciHTTP FORMPOST 613498266Sopenharmony_ci</keywords> 713498266Sopenharmony_ci</info> 813498266Sopenharmony_ci# Server-side 913498266Sopenharmony_ci<reply> 1013498266Sopenharmony_ci<data> 1113498266Sopenharmony_ciHTTP/1.1 200 OK 1213498266Sopenharmony_ciDate: Tue, 09 Nov 2010 14:49:00 GMT 1313498266Sopenharmony_ciServer: test-server/fake 1413498266Sopenharmony_ciContent-Length: 10 1513498266Sopenharmony_ci 1613498266Sopenharmony_ciblablabla 1713498266Sopenharmony_ci</data> 1813498266Sopenharmony_ci</reply> 1913498266Sopenharmony_ci 2013498266Sopenharmony_ci# Client-side 2113498266Sopenharmony_ci<client> 2213498266Sopenharmony_ci<features> 2313498266Sopenharmony_ciMime 2413498266Sopenharmony_ci</features> 2513498266Sopenharmony_ci<server> 2613498266Sopenharmony_cihttp 2713498266Sopenharmony_ci</server> 2813498266Sopenharmony_ci<name> 2913498266Sopenharmony_ciHTTP RFC1867-type formposting with filename= and type= 3013498266Sopenharmony_ci</name> 3113498266Sopenharmony_ci<command> 3213498266Sopenharmony_cihttp://%HOSTIP:%HTTPPORT/we/want/%TESTNUMBER -F name=daniel -F tool=curl --form-string "str1=@literal" --form-string "str2=<verbatim;type=xxx/yyy" -F "file=@%LOGDIR/test%TESTNUMBER.txt;type=moo/foobar;filename=fakerfile" -F file2=@%LOGDIR/test%TESTNUMBER.txt -F "file3=@\"%LOGDIR/test%TESTNUMBER.txt\";type=mo/foo;filename=\"f\\\\\\\\ak\\\\\\er,\\\\an\\d;.t\\\"xt\"" -F 'file4=@"%LOGDIR/test%TESTNUMBER.txt"; filename="A\\AA\"\"\\\"ZZZ"' 3313498266Sopenharmony_ci</command> 3413498266Sopenharmony_ci# We create this file before the command is invoked! 3513498266Sopenharmony_ci<file name="%LOGDIR/test%TESTNUMBER.txt"> 3613498266Sopenharmony_cifoo bar 3713498266Sopenharmony_ciThis is a bar foo 3813498266Sopenharmony_cibar 3913498266Sopenharmony_cifoo 4013498266Sopenharmony_ci</file> 4113498266Sopenharmony_ci</client> 4213498266Sopenharmony_ci 4313498266Sopenharmony_ci# Verify data after the test has been "shot" 4413498266Sopenharmony_ci<verify> 4513498266Sopenharmony_ci<strip> 4613498266Sopenharmony_ci^(Content-Type: multipart/form-data;|-------).* 4713498266Sopenharmony_ci</strip> 4813498266Sopenharmony_ci<protocol> 4913498266Sopenharmony_ciPOST /we/want/%TESTNUMBER HTTP/1.1 5013498266Sopenharmony_ciHost: %HOSTIP:%HTTPPORT 5113498266Sopenharmony_ciUser-Agent: curl/%VERSION 5213498266Sopenharmony_ciAccept: */* 5313498266Sopenharmony_ciContent-Length: 1234 5413498266Sopenharmony_ciContent-Type: multipart/form-data; boundary=----------------------------24e78000bd32 5513498266Sopenharmony_ci 5613498266Sopenharmony_ci------------------------------24e78000bd32 5713498266Sopenharmony_ciContent-Disposition: form-data; name="name" 5813498266Sopenharmony_ci 5913498266Sopenharmony_cidaniel 6013498266Sopenharmony_ci------------------------------24e78000bd32 6113498266Sopenharmony_ciContent-Disposition: form-data; name="tool" 6213498266Sopenharmony_ci 6313498266Sopenharmony_cicurl 6413498266Sopenharmony_ci------------------------------24e78000bd32 6513498266Sopenharmony_ciContent-Disposition: form-data; name="str1" 6613498266Sopenharmony_ci 6713498266Sopenharmony_ci@literal 6813498266Sopenharmony_ci------------------------------24e78000bd32 6913498266Sopenharmony_ciContent-Disposition: form-data; name="str2" 7013498266Sopenharmony_ci 7113498266Sopenharmony_ci<verbatim;type=xxx/yyy 7213498266Sopenharmony_ci------------------------------24e78000bd32 7313498266Sopenharmony_ciContent-Disposition: form-data; name="file"; filename="fakerfile" 7413498266Sopenharmony_ciContent-Type: moo/foobar 7513498266Sopenharmony_ci 7613498266Sopenharmony_cifoo bar 7713498266Sopenharmony_ciThis is a bar foo 7813498266Sopenharmony_cibar 7913498266Sopenharmony_cifoo 8013498266Sopenharmony_ci 8113498266Sopenharmony_ci------------------------------24e78000bd32 8213498266Sopenharmony_ciContent-Disposition: form-data; name="file2"; filename="test%TESTNUMBER.txt" 8313498266Sopenharmony_ciContent-Type: text/plain 8413498266Sopenharmony_ci 8513498266Sopenharmony_cifoo bar 8613498266Sopenharmony_ciThis is a bar foo 8713498266Sopenharmony_cibar 8813498266Sopenharmony_cifoo 8913498266Sopenharmony_ci 9013498266Sopenharmony_ci------------------------------24e78000bd32 9113498266Sopenharmony_ciContent-Disposition: form-data; name="file3"; filename="f\\ak\\er,\an\d;.t%22xt" 9213498266Sopenharmony_ciContent-Type: mo/foo 9313498266Sopenharmony_ci 9413498266Sopenharmony_cifoo bar 9513498266Sopenharmony_ciThis is a bar foo 9613498266Sopenharmony_cibar 9713498266Sopenharmony_cifoo 9813498266Sopenharmony_ci 9913498266Sopenharmony_ci------------------------------24e78000bd32 10013498266Sopenharmony_ciContent-Disposition: form-data; name="file4"; filename="A\AA%22%22\%22ZZZ" 10113498266Sopenharmony_ciContent-Type: text/plain 10213498266Sopenharmony_ci 10313498266Sopenharmony_cifoo bar 10413498266Sopenharmony_ciThis is a bar foo 10513498266Sopenharmony_cibar 10613498266Sopenharmony_cifoo 10713498266Sopenharmony_ci 10813498266Sopenharmony_ci------------------------------24e78000bd32-- 10913498266Sopenharmony_ci</protocol> 11013498266Sopenharmony_ci</verify> 11113498266Sopenharmony_ci</testcase> 112