Git init
[external/curl.git] / tests / data / test163
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
9
10 blablabla
11 </data>
12 </reply>
13
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
29 a
30 file
31
32 newlinens?
33 yes please
34         \r
35 [tab][CR] too
36 </file>
37 </client>
38
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\r
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\r
47 Host: %HOSTIP:%HTTPPORT\r
48 Accept: */*\r
49 Content-Length: 304\r
50 Expect: 100-continue\r
51 Content-Type: multipart/form-data; boundary=----------------------------c2d1767eb6ac\r
52 \r
53 ------------------------------c2d1767eb6ac\r
54 Content-Disposition: form-data; name="name"\r
55 \r
56 contents
57 from
58 a
59 file
60
61 newlinens?
62 yes please
63         \r
64 [tab][CR] too
65 \r
66 ------------------------------c2d1767eb6ac\r
67 Content-Disposition: form-data; name="tool"\r
68 \r
69 curl\r
70 ------------------------------c2d1767eb6ac--\r
71 </protocol>
72 </verify>
73 </testcase>