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