113498266Sopenharmony_ci<testcase>
213498266Sopenharmony_ci# Based on tests 186 and 1053
313498266Sopenharmony_ci<info>
413498266Sopenharmony_ci<keywords>
513498266Sopenharmony_ciHTTP
613498266Sopenharmony_ciHTTP FORMPOST
713498266Sopenharmony_ciHTTP file upload
813498266Sopenharmony_ci</keywords>
913498266Sopenharmony_ci</info>
1013498266Sopenharmony_ci
1113498266Sopenharmony_ci# Server-side
1213498266Sopenharmony_ci<reply>
1313498266Sopenharmony_ci<data>
1413498266Sopenharmony_ciHTTP/1.1 200 OK
1513498266Sopenharmony_ciDate: Thu, 29 Jul 2008 14:49:00 GMT
1613498266Sopenharmony_ciServer: test-server/fake
1713498266Sopenharmony_ciContent-Length: 0
1813498266Sopenharmony_ciConnection: close
1913498266Sopenharmony_ci
2013498266Sopenharmony_ci</data>
2113498266Sopenharmony_ci</reply>
2213498266Sopenharmony_ci
2313498266Sopenharmony_ci# Client-side
2413498266Sopenharmony_ci<client>
2513498266Sopenharmony_ci<features>
2613498266Sopenharmony_ciMime
2713498266Sopenharmony_ci</features>
2813498266Sopenharmony_ci<server>
2913498266Sopenharmony_cihttp
3013498266Sopenharmony_ci</server>
3113498266Sopenharmony_ci<name>
3213498266Sopenharmony_ciHTTP RFC1867-type formposting - -F with three files, one with explicit type
3313498266Sopenharmony_ci</name>
3413498266Sopenharmony_ci<command>
3513498266Sopenharmony_cihttp://%HOSTIP:%HTTPPORT/we/want/%TESTNUMBER -F name=value -F 'file=@%LOGDIR/test%TESTNUMBER.txt,%LOGDIR/test%TESTNUMBER.txt;type=magic/content,%LOGDIR/test%TESTNUMBER.txt'
3613498266Sopenharmony_ci</command>
3713498266Sopenharmony_ci# We create this file before the command is invoked!
3813498266Sopenharmony_ci<file name="%LOGDIR/test%TESTNUMBER.txt">
3913498266Sopenharmony_cidummy data
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-----+\w+
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: 845
5413498266Sopenharmony_ciContent-Type: multipart/form-data; boundary=----------------------------9ef8d6205763
5513498266Sopenharmony_ci
5613498266Sopenharmony_ci------------------------------9ef8d6205763
5713498266Sopenharmony_ciContent-Disposition: form-data; name="name"
5813498266Sopenharmony_ci
5913498266Sopenharmony_civalue
6013498266Sopenharmony_ci------------------------------9ef8d6205763
6113498266Sopenharmony_ciContent-Disposition: form-data; name="file"
6213498266Sopenharmony_ciContent-Type: multipart/mixed; boundary=----------------------------aaaaaaaaaaaa
6313498266Sopenharmony_ci
6413498266Sopenharmony_ciContent-Disposition: attachment; filename="test%TESTNUMBER.txt"
6513498266Sopenharmony_ciContent-Type: text/plain
6613498266Sopenharmony_ci
6713498266Sopenharmony_cidummy data
6813498266Sopenharmony_ci
6913498266Sopenharmony_ci------------------------------9ef8d6205763
7013498266Sopenharmony_ciContent-Disposition: attachment; filename="test%TESTNUMBER.txt"
7113498266Sopenharmony_ciContent-Type: magic/content
7213498266Sopenharmony_ci
7313498266Sopenharmony_cidummy data
7413498266Sopenharmony_ci
7513498266Sopenharmony_ci------------------------------9ef8d6205763
7613498266Sopenharmony_ciContent-Disposition: attachment; filename="test%TESTNUMBER.txt"
7713498266Sopenharmony_ciContent-Type: text/plain
7813498266Sopenharmony_ci
7913498266Sopenharmony_cidummy data
8013498266Sopenharmony_ci
8113498266Sopenharmony_ci------------------------------aaaaaaaaaaaa--
8213498266Sopenharmony_ci
8313498266Sopenharmony_ci------------------------------9ef8d6205763--
8413498266Sopenharmony_ci</protocol>
8513498266Sopenharmony_ci</verify>
8613498266Sopenharmony_ci</testcase>
87