Resync
[CMakeLuaTailorHgBridge.git] / CMakeLua / Utilities / cmcurl-7.19.0 / tests / data / test1053
blob1502dae360489e0d70f74bb604882e7c62f51852
1 <testcase>
2 # Based on test 9
3 <info>
4 <keywords>
5 HTTP
6 HTTP FORMPOST
7 HTTP file upload
8 followlocation
9 </keywords>
10 </info>
12 # Server-side
13 <reply>
14 <data>
15 HTTP/1.0 307 Redirect swsclose
16 Date: Thu, 29 Jul 2008 14:49:00 GMT
17 Server: test-server/fake
18 Location: data/10530002.txt?coolsite=yes
19 Content-Length: 0
20 Connection: close
22 </data>
23 <data2>
24 HTTP/1.0 200 OK swsclose
25 Date: Thu, 09 Nov 2010 14:49:00 GMT
26 Server: test-server/fake
28 blablabla
30 </data2>
31 <datacheck>
32 HTTP/1.0 307 Redirect swsclose
33 Date: Thu, 29 Jul 2008 14:49:00 GMT
34 Server: test-server/fake
35 Location: data/10530002.txt?coolsite=yes
36 Content-Length: 0
37 Connection: close
39 HTTP/1.0 200 OK swsclose
40 Date: Thu, 09 Nov 2010 14:49:00 GMT
41 Server: test-server/fake
43 blablabla
45 </datacheck>
46 </reply>
48 # Client-side
49 <client>
50 <server>
51 http
52 </server>
53  <name>
54 HTTP RFC1867-type formposting from file with Location: following
55  </name>
56  <command>
57 http://%HOSTIP:%HTTPPORT/we/want/1053 -L -F name=daniel -F tool=curl -F file=@log/test1053.txt
58 </command>
59 # We create this file before the command is invoked!
60 <file name="log/test1053.txt">
61 foo-
62 This is a moo-
63 bar
64 </file>
65 </client>
67 # Verify data after the test has been "shot"
68 <verify>
69 <strip>
70 ^(User-Agent:|Content-Type: multipart/form-data;|------------).*
71 </strip>
72 <protocol>
73 POST /we/want/1053 HTTP/1.1
74 User-Agent: curl/7.18.2 (i686-pc-linux-gnu) libcurl/7.18.2 OpenSSL/0.9.7a ipv6 zlib/1.1.4
75 Host: %HOSTIP:%HTTPPORT
76 Accept: */*
77 Content-Length: 410
78 Expect: 100-continue
79 Content-Type: multipart/form-data; boundary=----------------------------9ef8d6205763
81 ------------------------------9ef8d6205763
82 Content-Disposition: form-data; name="name"
84 daniel
85 ------------------------------9ef8d6205763
86 Content-Disposition: form-data; name="tool"
88 curl
89 ------------------------------9ef8d6205763
90 Content-Disposition: form-data; name="file"; filename="test1053.txt"
91 Content-Type: text/plain
93 foo-
94 This is a moo-
95 bar
97 ------------------------------9ef8d6205763--
98 POST /we/want/data/10530002.txt?coolsite=yes HTTP/1.1
99 User-Agent: curl/7.18.2 (i686-pc-linux-gnu) libcurl/7.18.2 OpenSSL/0.9.7a ipv6 zlib/1.1.4
100 Host: %HOSTIP:%HTTPPORT
101 Accept: */*
102 Content-Length: 410
103 Expect: 100-continue
104 Content-Type: multipart/form-data; boundary=----------------------------9ef8d6205763
106 ------------------------------9ef8d6205763
107 Content-Disposition: form-data; name="name"
109 daniel
110 ------------------------------9ef8d6205763
111 Content-Disposition: form-data; name="tool"
113 curl
114 ------------------------------9ef8d6205763
115 Content-Disposition: form-data; name="file"; filename="test1053.txt"
116 Content-Type: text/plain
118 foo-
119 This is a moo-
122 ------------------------------9ef8d6205763--
123 </protocol>
124 </verify>
125 </testcase>