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 containing '"'
3013498266Sopenharmony_ci</name>
3113498266Sopenharmony_ci<command>
3213498266Sopenharmony_cihttp://%HOSTIP:%HTTPPORT/we/want/%TESTNUMBER -F "file=@\"%LOGDIR/test%TESTNUMBER\\\".txt\";type=mo/foo;filename=\"test%TESTNUMBER\\\".txt\"" -F 'file2=@"%LOGDIR/test%TESTNUMBER\".txt"' -F 'file3=@"%LOGDIR/test%TESTNUMBER\".txt";type=m/f,"%LOGDIR/test%TESTNUMBER\".txt"'
3313498266Sopenharmony_ci</command>
3413498266Sopenharmony_ci<precheck>
3513498266Sopenharmony_ciperl -e "print 'Test requires a system supporting double quotes in file names' if ($^O eq 'msys');"
3613498266Sopenharmony_ci</precheck>
3713498266Sopenharmony_ci# We create this file before the command is invoked!
3813498266Sopenharmony_ci<file name=%LOGDIR/test%TESTNUMBER".txt>
3913498266Sopenharmony_cifoo bar
4013498266Sopenharmony_ciThis is a bar foo
4113498266Sopenharmony_cibar
4213498266Sopenharmony_cifoo
4313498266Sopenharmony_ci</file>
4413498266Sopenharmony_ci</client>
4513498266Sopenharmony_ci
4613498266Sopenharmony_ci# Verify data after the test has been "shot"
4713498266Sopenharmony_ci<verify>
4813498266Sopenharmony_ci<strip>
4913498266Sopenharmony_ci^(Content-Type: multipart/form-data;|Content-Type: multipart/mixed; boundary=|-------).*
5013498266Sopenharmony_ci</strip>
5113498266Sopenharmony_ci<protocol>
5213498266Sopenharmony_ciPOST /we/want/%TESTNUMBER HTTP/1.1
5313498266Sopenharmony_ciHost: %HOSTIP:%HTTPPORT
5413498266Sopenharmony_ciUser-Agent: curl/%VERSION
5513498266Sopenharmony_ciAccept: */*
5613498266Sopenharmony_ciContent-Length: 1006
5713498266Sopenharmony_ciContent-Type: multipart/form-data; boundary=----------------------------24e78000bd32
5813498266Sopenharmony_ci
5913498266Sopenharmony_ci------------------------------24e78000bd32
6013498266Sopenharmony_ciContent-Disposition: form-data; name="file"; filename="test%TESTNUMBER%22.txt"
6113498266Sopenharmony_ciContent-Type: mo/foo
6213498266Sopenharmony_ci
6313498266Sopenharmony_cifoo bar
6413498266Sopenharmony_ciThis is a bar foo
6513498266Sopenharmony_cibar
6613498266Sopenharmony_cifoo
6713498266Sopenharmony_ci
6813498266Sopenharmony_ci------------------------------24e78000bd32
6913498266Sopenharmony_ciContent-Disposition: form-data; name="file2"; filename="test%TESTNUMBER%22.txt"
7013498266Sopenharmony_ciContent-Type: text/plain
7113498266Sopenharmony_ci
7213498266Sopenharmony_cifoo bar
7313498266Sopenharmony_ciThis is a bar foo
7413498266Sopenharmony_cibar
7513498266Sopenharmony_cifoo
7613498266Sopenharmony_ci
7713498266Sopenharmony_ci------------------------------24e78000bd32
7813498266Sopenharmony_ciContent-Disposition: form-data; name="file3"
7913498266Sopenharmony_ciContent-Type: multipart/mixed; boundary=----------------------------7f0e85a48b0b
8013498266Sopenharmony_ci
8113498266Sopenharmony_ciContent-Disposition: attachment; filename="test%TESTNUMBER%22.txt"
8213498266Sopenharmony_ciContent-Type: m/f
8313498266Sopenharmony_ci
8413498266Sopenharmony_cifoo bar
8513498266Sopenharmony_ciThis is a bar foo
8613498266Sopenharmony_cibar
8713498266Sopenharmony_cifoo
8813498266Sopenharmony_ci
8913498266Sopenharmony_ciContent-Disposition: attachment; filename="test%TESTNUMBER%22.txt"
9013498266Sopenharmony_ciContent-Type: text/plain
9113498266Sopenharmony_ci
9213498266Sopenharmony_cifoo bar
9313498266Sopenharmony_ciThis is a bar foo
9413498266Sopenharmony_cibar
9513498266Sopenharmony_cifoo
9613498266Sopenharmony_ci
9713498266Sopenharmony_ci
9813498266Sopenharmony_ci------------------------------24e78000bd32--
9913498266Sopenharmony_ci</protocol>
10013498266Sopenharmony_ci</verify>
10113498266Sopenharmony_ci</testcase>
102