xref: /curl/tests/data/test2073 (revision 3fd80c7b)
1<testcase>
2<info>
3<keywords>
4HTTP
5HTTP FORMPOST
6</keywords>
7</info>
8#
9# Server-side
10<reply>
11<data>
12HTTP/1.1 200 OK
13Date: Tue, 09 Nov 2010 14:49:00 GMT
14Content-Length: 10
15
16contents1
17</data>
18<data1>
19HTTP/1.1 200 OK
20Date: Tue, 09 Nov 2010 14:49:00 GMT
21Content-Length: 10
22
23contents2
24</data1>
25</reply>
26
27#
28# Client-side
29<client>
30<features>
31Mime
32</features>
33<server>
34http
35</server>
36<name>
37HTTP form posts with handle reset
38</name>
39<command>
40http://%HOSTIP:%HTTPPORT/%TESTNUMBER -F 'name=a;filename=a.pdf' --next http://%HOSTIP:%HTTPPORT/%TESTNUMBER -F 'name=b;filename=b.jpg'
41</command>
42</client>
43
44#
45# Verify data after the test has been "shot"
46<verify>
47<strip>
48^(Content-Type: multipart/form-data;|------------).*
49</strip>
50<protocol>
51POST /%TESTNUMBER HTTP/1.1
52Host: %HOSTIP:%HTTPPORT
53User-Agent: curl/%VERSION
54Accept: */*
55Content-Length: 201
56
57Content-Disposition: form-data; name="name"; filename="a.pdf"
58Content-Type: application/pdf
59
60a
61POST /%TESTNUMBER HTTP/1.1
62Host: %HOSTIP:%HTTPPORT
63User-Agent: curl/%VERSION
64Accept: */*
65Content-Length: 196
66
67Content-Disposition: form-data; name="name"; filename="b.jpg"
68Content-Type: image/jpeg
69
70b
71</protocol>
72</verify>
73</testcase>
74