• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
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>
76^timeout = [5-6]$
77</strip>
78<protocol>
79GET /%TESTNUMBER0001 HTTP/1.1
80Host: %HOSTIP:%HTTPPORT
81User-Agent: curl/%VERSION
82Accept: */*
83
84USER anonymous
85PASS ftp@example.com
86PWD
87EPSV
88TYPE I
89SIZE %TESTNUMBER0002
90RETR %TESTNUMBER0002
91opcode = 1
92mode = octet
93tsize = 0
94blksize = 512
95filename = /%TESTNUMBER0003
96opcode = 1
97mode = octet
98tsize = 0
99blksize = 512
100filename = /%TESTNUMBER0003
101EPSV
102SIZE %TESTNUMBER0002
103RETR %TESTNUMBER0002
104GET /%TESTNUMBER0001 HTTP/1.1
105Host: %HOSTIP:%HTTPPORT
106User-Agent: curl/%VERSION
107Accept: */*
108
109QUIT
110</protocol>
111<stdout>
112-foo-
113data
114    to
115      see
116that FTP
117works
118  so does it?
119foo
120   bar
121bar
122   foo
123moo
124a chunk of
125data
126returned
127 to TFTP client
128a chunk of
129data
130returned
131 to TFTP client
132foo
133   bar
134bar
135   foo
136moo
137data
138    to
139      see
140that FTP
141works
142  so does it?
143-foo-
144</stdout>
145</verify>
146</testcase>
147