Debian Codegraph @

curl/tests/data/test9

raw
1 <info>
2 <keywords>
3 HTTP
4 HTTP FORMPOST
5 HTTP file upload
6 </keywords>
7 </info>
8 # Server-side
9 <reply>
10 <data>
11 HTTP/1.1 200 OK swsclose
12 Date: Thu, 09 Nov 2010 14:49:00 GMT
13 Server: test-server/fake
14
15 blablabla
16
17 </data>
18 </reply>
19
20 # Client-side
21 <client>
22 <server>
23 http
24 </server>
25 <name>
26 HTTP RFC1867-type formposting
27 </name>
28 <command>
29 http://%HOSTIP:%HTTPPORT/we/want/9 -F name=daniel -F tool=curl -F file=@log/test9.txt
30 </command>
31 # We create this file before the command is invoked!
32 <file name="log/test9.txt">
33 foo-
34 This is a moo-
35 bar
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/9 HTTP/1.1
46 User-Agent: curl/7.10.4 (i686-pc-linux-gnu) libcurl/7.10.4 OpenSSL/0.9.7a ipv6 zlib/1.1.3
47 Host: 127.0.0.1:%HTTPPORT
48 Accept: */*
49 Content-Length: 407
50 Expect: 100-continue
51 Content-Type: multipart/form-data; boundary=----------------------------9ef8d6205763
52
53 ------------------------------9ef8d6205763
54 Content-Disposition: form-data; name="name"
55
56 daniel
57 ------------------------------9ef8d6205763
58 Content-Disposition: form-data; name="tool"
59
60 curl
61 ------------------------------9ef8d6205763
62 Content-Disposition: form-data; name="file"; filename="test9.txt"
63 Content-Type: text/plain
64
65 foo-
66 This is a moo-
67 bar
68
69 ------------------------------9ef8d6205763--
70 </protocol>
71 </verify>