134f7ef970274170a2813206363d120e5104f0f6
[external/curl.git] / tests / data / test554
1 <testcase>
2 #
3 # Server-side
4 <reply>
5 <data mode="text">
6 HTTP/1.1 200 OK
7 Date: Thu, 09 Nov 2010 14:49:00 GMT
8 Server: test-server/fake swsclose
9 Connection: close
10 Content-Type: text/html
11
12 hello
13 </data>
14 </reply>
15
16 # Client-side
17 <client>
18 <server>
19 http
20 </server>
21 # tool is what to use instead of 'curl'
22 <tool>
23 lib554
24 </tool>
25
26  <name>
27 HTTP multi-part formpost using read callback for the file part
28  </name>
29  <command>
30 http://%HOSTIP:%HTTPPORT/554
31 </command>
32 </client>
33
34 #
35 # Verify data after the test has been "shot"
36 <verify>
37 <strippart>
38 s/^------------------------------[a-z0-9]*/------------------------------/
39 s/boundary=----------------------------[a-z0-9]*/boundary=----------------------------/
40 </strippart>
41 # Note that the stripping above removes 12 bytes from every occurance of the
42 # boundary string and since 4 of them are in the body contents, we see
43 # 415 - (4*12) here == 367 bytes.
44 <protocol>
45 POST /554 HTTP/1.1\r
46 Host: %HOSTIP:%HTTPPORT\r
47 Accept: */*\r
48 Content-Length: 415\r
49 Expect: 100-continue\r
50 Content-Type: multipart/form-data; boundary=----------------------------\r
51 \r
52 ------------------------------\r
53 Content-Disposition: form-data; name="sendfile"; filename="postit2.c"\r
54 \r
55 this is what we post to the silly web server
56 \r
57 ------------------------------\r
58 Content-Disposition: form-data; name="filename"\r
59 \r
60 postit2.c\r
61 ------------------------------\r
62 Content-Disposition: form-data; name="submit"\r
63 \r
64 send\r
65 --------------------------------\r
66 </protocol>
67 </verify>
68 </testcase>