tizen 2.3.1 release
[external/curl.git] / tests / data / test163
1 <testcase>
2 <info>
3 <keywords>
4 HTTP
5 HTTP POST
6 </keywords>
7 </info>
8
9 # Server-side
10 <reply>
11 <data>
12 HTTP/1.1 200 OK swsclose
13 Date: Thu, 09 Nov 2010 14:49:00 GMT
14 Server: test-server/fake
15 Content-Length: 10
16
17 blablabla
18 </data>
19 </reply>
20
21 # Client-side
22 <client>
23 <server>
24 http
25 </server>
26  <name>
27 HTTP multipart formpost with contents from a file
28  </name>
29  <command>
30 http://%HOSTIP:%HTTPPORT/we/want/163 -F "name=<log/field163" -F tool=curl
31 </command>
32 # We create this file before the command is invoked!
33 <file name="log/field163">
34 contents
35 from
36 a
37 file
38
39 newlinens?
40 yes please
41         \r
42 [tab][CR] too
43 </file>
44 </client>
45
46 # Verify data after the test has been "shot"
47 <verify>
48 <strip>
49 ^(User-Agent:|Content-Type: multipart/form-data;|------------).*
50 </strip>
51 <protocol>
52 POST /we/want/163 HTTP/1.1\r
53 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
54 Host: %HOSTIP:%HTTPPORT\r
55 Accept: */*\r
56 Content-Length: 304\r
57 Expect: 100-continue\r
58 Content-Type: multipart/form-data; boundary=----------------------------c2d1767eb6ac\r
59 \r
60 ------------------------------c2d1767eb6ac\r
61 Content-Disposition: form-data; name="name"\r
62 \r
63 contents
64 from
65 a
66 file
67
68 newlinens?
69 yes please
70         \r
71 [tab][CR] too
72 \r
73 ------------------------------c2d1767eb6ac\r
74 Content-Disposition: form-data; name="tool"\r
75 \r
76 curl\r
77 ------------------------------c2d1767eb6ac--\r
78 </protocol>
79 </verify>
80 </testcase>