• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
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: Thu, 09 Nov 2010 14:49:00 GMT
14Content-Length: 10
15
16contents1
17</data>
18<data1>
19HTTP/1.1 200 OK
20Date: Thu, 09 Nov 2010 14:49:00 GMT
21Content-Length: 10
22
23contents2
24</data1>
25</reply>
26
27#
28# Client-side
29<client>
30<server>
31http
32</server>
33 <name>
34HTTP form posts with handle reset
35 </name>
36 <command>
37http://%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>
48POST /2073 HTTP/1.1
49Host: %HOSTIP:%HTTPPORT
50Accept: */*
51Content-Length: 189
52
53Content-Disposition: form-data; name="name"; filename="a.pdf"
54Content-Type: application/pdf
55
56a
57POST /2073 HTTP/1.1
58Host: %HOSTIP:%HTTPPORT
59Accept: */*
60Content-Length: 184
61
62Content-Disposition: form-data; name="name"; filename="b.jpg"
63Content-Type: image/jpeg
64
65b
66</protocol>
67</verify>
68</testcase>
69