Imported Upstream version 7.40.0
[platform/upstream/curl.git] / tests / data / test212
1 <testcase>
2 <info>
3 <keywords>
4 FTP
5 EPRT
6 </keywords>
7 </info>
8
9 # Server-side
10 <reply>
11 <data>
12 data blobb
13 </data>
14 <servercmd>
15 REPLY EPRT 500 no such command
16 </servercmd>
17 </reply>
18
19 # Client-side
20 <client>
21 <server>
22 ftp
23 </server>
24 # EPRT is only sent when IPv6 is enabled
25 <features>
26 ipv6
27 </features>
28  <name>
29 Get two FTP files with no remote EPRT support
30  </name>
31  <command>
32 ftp://%HOSTIP:%FTPPORT/a/path/212 ftp://%HOSTIP:%FTPPORT/a/path/212 -P -
33 </command>
34 <stdout>
35 data blobb
36 data blobb
37 </stdout>
38 </client>
39
40 # Verify data after the test has been "shot"
41 <verify>
42 # Strip the addresses and port number but leave the rest
43 <strippart>
44 s/^(EPRT \|1\|)\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3}\|\d{1,5}\|/$1/
45 s/^(PORT )\d{1,3},\d{1,3},\d{1,3},\d{1,3},\d{1,3},\d{1,3}/$1/
46 </strippart>
47 <protocol>
48 USER anonymous\r
49 PASS ftp@example.com\r
50 PWD\r
51 CWD a\r
52 CWD path\r
53 EPRT |1|\r
54 PORT \r
55 TYPE I\r
56 SIZE 212\r
57 RETR 212\r
58 PORT \r
59 SIZE 212\r
60 RETR 212\r
61 QUIT\r
62 </protocol>
63 </verify>
64 </testcase>