Resync
[CMakeLuaTailorHgBridge.git] / CMakeLua / Utilities / cmcurl-7.19.0 / tests / data / test163
blobbea5e7602fd40964b8662f95bb41b0ec9f7b2c95
1 <testcase>
2 # Server-side
3 <reply>
4 <data>
5 HTTP/1.1 200 OK swsclose
6 Date: Thu, 09 Nov 2010 14:49:00 GMT
7 Server: test-server/fake
8 Content-Length: 10
10 blablabla
11 </data>
12 </reply>
14 # Client-side
15 <client>
16 <server>
17 http
18 </server>
19  <name>
20 HTTP multipart formpost with contents from a file
21  </name>
22  <command>
23 http://%HOSTIP:%HTTPPORT/we/want/163 -F "name=<log/field163" -F tool=curl
24 </command>
25 # We create this file before the command is invoked!
26 <file name="log/field163">
27 contents
28 from
30 file
32 newlinens?
33 yes please
34         
35 [tab][CR] too
36 </file>
37 </client>
39 # Verify data after the test has been "shot"
40 <verify>
41 <strip>
42 ^(User-Agent:|Content-Type: multipart/form-data;|------------).*
43 </strip>
44 <protocol>
45 POST /we/want/163 HTTP/1.1
46 User-Agent: curl/7.11.2-CVS (i686-pc-linux-gnu) libcurl/7.11.2-CVS OpenSSL/0.9.6b zlib/1.1.4 c-ares/1.0.0
47 Host: %HOSTIP:%HTTPPORT
48 Accept: */*
49 Content-Length: 304
50 Expect: 100-continue
51 Content-Type: multipart/form-data; boundary=----------------------------c2d1767eb6ac
53 ------------------------------c2d1767eb6ac
54 Content-Disposition: form-data; name="name"
56 contents
57 from
59 file
61 newlinens?
62 yes please
63         
64 [tab][CR] too
66 ------------------------------c2d1767eb6ac
67 Content-Disposition: form-data; name="tool"
69 curl
70 ------------------------------c2d1767eb6ac--
71 </protocol>
72 </verify>
73 </testcase>