• 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^(Content-Type: multipart/form-data;|------------).*
46</strip>
47<protocol>
48POST /2073 HTTP/1.1
49Host: %HOSTIP:%HTTPPORT
50User-Agent: curl/%VERSION
51Accept: */*
52Content-Length: 189
53
54Content-Disposition: form-data; name="name"; filename="a.pdf"
55Content-Type: application/pdf
56
57a
58POST /2073 HTTP/1.1
59Host: %HOSTIP:%HTTPPORT
60User-Agent: curl/%VERSION
61Accept: */*
62Content-Length: 184
63
64Content-Disposition: form-data; name="name"; filename="b.jpg"
65Content-Type: image/jpeg
66
67b
68</protocol>
69</verify>
70</testcase>
71