Debian Codegraph @

deps/curl/tests/data/test1158

raw
1 <testcase>
2 <info>
3 <keywords>
4 HTTP
5 HTTP FORMPOST
6 </keywords>
7 </info>
8 # Server-side
9 <reply>
10 <data>
11 HTTP/1.1 200 OK
12 Date: Thu, 09 Nov 2010 14:49:00 GMT
13 Server: test-server/fake
14 Content-Length: 10
15
16 blablabla
17 </data>
18 </reply>
19
20 # Client-side
21 <client>
22 <server>
23 http
24 </server>
25 <name>
26 HTTP RFC1867-type formposting with filename containing '"'
27 </name>
28 <command>
29 http://%HOSTIP:%HTTPPORT/we/want/1158 -F "file=@\"log/test1158\\\".txt\";type=mo/foo;filename=\"test1158\\\".txt\"" -F 'file2=@"log/test1158\".txt"' -F 'file3=@"log/test1158\".txt";type=m/f,"log/test1158\".txt"'
30 </command>
31 <precheck>
32 perl -e "print 'Test requires a system supporting double quotes in file names' if ($^O eq 'msys');"
33 </precheck>
34 # We create this file before the command is invoked!
35 <file name=log/test1158".txt>
36 foo bar
37 This is a bar foo
38 bar
39 foo
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;|Content-Type: multipart/mixed; boundary=|-------).*
47 </strip>
48 <protocol>
49 POST /we/want/1158 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: %HOSTIP:%HTTPPORT
52 Accept: */*
53 Content-Length: 954
54 Content-Type: multipart/form-data; boundary=----------------------------24e78000bd32
55
56 ------------------------------24e78000bd32
57 Content-Disposition: form-data; name="file"; filename="test1158\".txt"
58 Content-Type: mo/foo
59
60 foo bar
61 This is a bar foo
62 bar
63 foo
64
65 ------------------------------24e78000bd32
66 Content-Disposition: form-data; name="file2"; filename="test1158\".txt"
67 Content-Type: text/plain
68
69 foo bar
70 This is a bar foo
71 bar
72 foo
73
74 ------------------------------24e78000bd32
75 Content-Disposition: form-data; name="file3"
76 Content-Type: multipart/mixed; boundary=----------------------------7f0e85a48b0b
77
78 Content-Disposition: attachment; filename="test1158\".txt"
79 Content-Type: m/f
80
81 foo bar
82 This is a bar foo
83 bar
84 foo
85
86 Content-Disposition: attachment; filename="test1158\".txt"
87 Content-Type: text/plain
88
89 foo bar
90 This is a bar foo
91 bar
92 foo
93
94
95 ------------------------------24e78000bd32--
96 </protocol>
97 </verify>
98 </testcase>