Imported Upstream version 7.48.0
[platform/upstream/curl.git] / tests / data / test2003
1 <testcase>
2 <info>
3 <keywords>
4 HTTP
5 HTTP GET
6 FTP
7 PASV
8 FILE
9 TFTP
10 TFTP RRQ
11 multiprotocol
12 </keywords>
13 </info>
14
15 #
16 # Server-side
17 <reply>
18 <data1 nocheck="yes">
19 HTTP/1.1 200 OK\r
20 Date: Thu, 09 Nov 2010 14:49:00 GMT\r
21 Server: test-server/fake\r
22 Last-Modified: Tue, 13 Jun 2000 12:10:00 GMT\r
23 ETag: "21025-dc7-39462498"\r
24 Accept-Ranges: bytes\r
25 Content-Length: 6\r
26 Connection: close\r
27 Content-Type: text/html\r
28 Funny-head: yesyes\r
29 \r
30 -foo-
31 </data1>
32 <data2 nocheck="yes">
33 data
34     to
35       see
36 that FTP
37 works
38   so does it?
39 </data2>
40 <data3 nocheck="yes">
41 a chunk of
42 data
43 returned
44  to TFTP client
45 </data3>
46 </reply>
47
48 #
49 # Client-side
50 <client>
51 <server>
52 http
53 ftp
54 file
55 tftp
56 </server>
57  <name>
58 HTTP GET followed by FTP RETR followed by FILE followed by TFTP RRQ then again in reverse order
59  </name>
60  <command>
61 http://%HOSTIP:%HTTPPORT/20030001 ftp://%HOSTIP:%FTPPORT/20030002 file://localhost/%PWD/log/test2003.txt tftp://%HOSTIP:%TFTPPORT//20030003 tftp://%HOSTIP:%TFTPPORT//20030003 file://localhost/%PWD/log/test2003.txt ftp://%HOSTIP:%FTPPORT/20030002 http://%HOSTIP:%HTTPPORT/20030001 
62 </command>
63 <file name="log/test2003.txt">
64 foo
65    bar
66 bar
67    foo
68 moo
69 </file>
70 </client>
71
72 #
73 # Verify data after the test has been "shot"
74 <verify>
75 <strip>
76 ^User-Agent:.*
77 </strip>
78 <protocol>
79 GET /20030001 HTTP/1.1\r
80 Host: %HOSTIP:%HTTPPORT\r
81 Accept: */*\r
82 \r
83 USER anonymous\r
84 PASS ftp@example.com\r
85 PWD\r
86 EPSV\r
87 TYPE I\r
88 SIZE 20030002\r
89 RETR 20030002\r
90 opcode: 1
91 mode: octet
92 tsize: 0
93 blksize: 512
94 timeout: 6
95 filename: /20030003
96 opcode: 1
97 mode: octet
98 tsize: 0
99 blksize: 512
100 timeout: 6
101 filename: /20030003
102 EPSV\r
103 SIZE 20030002\r
104 RETR 20030002\r
105 GET /20030001 HTTP/1.1\r
106 Host: %HOSTIP:%HTTPPORT\r
107 Accept: */*\r
108 \r
109 QUIT\r
110 </protocol>
111 <stdout>
112 HTTP/1.1 200 OK\r
113 Date: Thu, 09 Nov 2010 14:49:00 GMT\r
114 Server: test-server/fake\r
115 Last-Modified: Tue, 13 Jun 2000 12:10:00 GMT\r
116 ETag: "21025-dc7-39462498"\r
117 Accept-Ranges: bytes\r
118 Content-Length: 6\r
119 Connection: close\r
120 Content-Type: text/html\r
121 Funny-head: yesyes\r
122 \r
123 -foo-
124 data
125     to
126       see
127 that FTP
128 works
129   so does it?
130 foo
131    bar
132 bar
133    foo
134 moo
135 a chunk of
136 data
137 returned
138  to TFTP client
139 a chunk of
140 data
141 returned
142  to TFTP client
143 foo
144    bar
145 bar
146    foo
147 moo
148 data
149     to
150       see
151 that FTP
152 works
153   so does it?
154 HTTP/1.1 200 OK\r
155 Date: Thu, 09 Nov 2010 14:49:00 GMT\r
156 Server: test-server/fake\r
157 Last-Modified: Tue, 13 Jun 2000 12:10:00 GMT\r
158 ETag: "21025-dc7-39462498"\r
159 Accept-Ranges: bytes\r
160 Content-Length: 6\r
161 Connection: close\r
162 Content-Type: text/html\r
163 Funny-head: yesyes\r
164 \r
165 -foo-
166 </stdout>
167 </verify>
168 </testcase>