Debian Codegraph @

curl/tests/data/test44

raw
1 <info>
2 <keywords>
3 HTTP
4 HTTP FORMPOST
5 HTTP replaced headers
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 without Expect: header
27 </name>
28 <command>
29 http://%HOSTIP:%HTTPPORT/we/want/44 -F name=daniel -F tool=curl -F file=@log/test44.txt -H 'Expect:'
30 </command>
31 # We create this file before the command is invoked!
32 <file name="log/test44.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/44 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: 408
50 Content-Type: multipart/form-data; boundary=----------------------------7c633d5c27ce
51
52 ------------------------------7c633d5c27ce
53 Content-Disposition: form-data; name="name"
54
55 daniel
56 ------------------------------7c633d5c27ce
57 Content-Disposition: form-data; name="tool"
58
59 curl
60 ------------------------------7c633d5c27ce
61 Content-Disposition: form-data; name="file"; filename="test44.txt"
62 Content-Type: text/plain
63
64 foo-
65 This is a moo-
66 bar
67
68 ------------------------------7c633d5c27ce--
69 </protocol>
70 </verify>