Debian Codegraph @

curl/tests/data/test186

raw
1 # Server-side
2 <reply>
3 <data>
4 HTTP/1.1 200 OK swsclose
5 Date: Thu, 09 Nov 2010 14:49:00 GMT
6 Server: test-server/fake
7
8 blablabla
9
10 </data>
11 </reply>
12
13 # Client-side
14 <client>
15 <server>
16 http
17 </server>
18 <name>
19 HTTP RFC1867-type formposting with types on text fields
20 </name>
21 <command>
22 http://%HOSTIP:%HTTPPORT/we/want/186 -F "name=daniel;type=moo/foo" -F "html= <body>hello</body>;type=text/html"
23 </command>
24 # We create this file before the command is invoked!
25 </client>
26
27 # Verify data after the test has been "shot"
28 <verify>
29 <strip>
30 ^(User-Agent:|Content-Type: multipart/form-data;|------------).*
31 </strip>
32 <protocol>
33 POST /we/want/186 HTTP/1.1
34 User-Agent: curl/7.12.2-CVS (i686-pc-linux-gnu) libcurl/7.12.2-CVS OpenSSL/0.9.7d zlib/1.2.1.1 c-ares/1.2.0 libidn/0.5.2
35 Host: 127.0.0.1:%HTTPPORT
36 Accept: */*
37 Content-Length: 305
38 Expect: 100-continue
39 Content-Type: multipart/form-data; boundary=----------------------------212d9006ceb5
40
41 ------------------------------212d9006ceb5
42 Content-Disposition: form-data; name="name"
43 Content-Type: moo/foo
44
45 daniel
46 ------------------------------212d9006ceb5
47 Content-Disposition: form-data; name="html"
48 Content-Type: text/html
49
50 <body>hello</body>
51 ------------------------------212d9006ceb5--
52 </protocol>
53 </verify>