Debian Codegraph @

curl/tests/data/test39

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
11 Date: Thu, 09 Nov 2010 14:49:00 GMT
12 Server: test-server/fake
13 Content-Length: 10
14
15 blablabla
16 </data>
17 </reply>
18
19 # Client-side
20 <client>
21 <server>
22 http
23 </server>
24 <name>
25 HTTP RFC1867-type formposting with filename= and type=
26 </name>
27 <command>
28 http://%HOSTIP:%HTTPPORT/we/want/39 -F name=daniel -F tool=curl --form-string "str1=@literal" --form-string "str2=<verbatim;type=xxx/yyy" -F "file=@log/test39.txt;filename=fakerfile;type=moo/foobar" -F file2=@log/test39.txt
29 </command>
30 # We create this file before the command is invoked!
31 <file name="log/test39.txt">
32 foo bar
33 This is a bar foo
34 bar
35 foo
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/39 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: 810
50 Expect: 100-continue
51 Content-Type: multipart/form-data; boundary=----------------------------24e78000bd32
52
53 ------------------------------24e78000bd32
54 Content-Disposition: form-data; name="name"
55
56 daniel
57 ------------------------------24e78000bd32
58 Content-Disposition: form-data; name="tool"
59
60 curl
61 ------------------------------24e78000bd32
62 Content-Disposition: form-data; name="str1"
63
64 @literal
65 ------------------------------24e78000bd32
66 Content-Disposition: form-data; name="str2"
67
68 <verbatim;type=xxx/yyy
69 ------------------------------24e78000bd32
70 Content-Disposition: form-data; name="file"; filename="fakerfile"
71 Content-Type: moo/foobar
72
73 foo bar
74 This is a bar foo
75 bar
76 foo
77
78 ------------------------------24e78000bd32
79 Content-Disposition: form-data; name="file2"; filename="test39.txt"
80 Content-Type: text/plain
81
82 foo bar
83 This is a bar foo
84 bar
85 foo
86
87 ------------------------------24e78000bd32--
88 </protocol>
89 </verify>