Debian Codegraph @

curl/tests/data/test71

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