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