Resync
[CMakeLuaTailorHgBridge.git] / CMakeLua / Utilities / cmcurl-7.19.0 / tests / data / test554
blobc41661d2a2c7c3120bbef059b2a3bd3855115deb
1 <testcase>
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
12 hello
13 </data>
14 </reply>
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>
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>
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
46 Host: %HOSTIP:%HTTPPORT
47 Accept: */*
48 Content-Length: 415
49 Expect: 100-continue
50 Content-Type: multipart/form-data; boundary=----------------------------
52 ------------------------------
53 Content-Disposition: form-data; name="sendfile"; filename="postit2.c"
55 this is what we post to the silly web server
57 ------------------------------
58 Content-Disposition: form-data; name="filename"
60 postit2.c
61 ------------------------------
62 Content-Disposition: form-data; name="submit"
64 send
65 --------------------------------
66 </protocol>
67 </verify>
68 </testcase>