Imported Upstream version 7.59.0
[platform/upstream/curl.git] / tests / data / test116
1 <testcase>
2 <info>
3 <keywords>
4 FTP
5 EPRT
6 PORT
7 FAILURE
8 EPRT refused
9 </keywords>
10 </info>
11 # Server-side
12 <reply>
13 <servercmd>
14 REPLY EPRT 500 we don't like EPRT now
15 REPLY PORT 314 bluah you f00l!
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 FTP download, failed PORT
30  </name>
31  <command>
32 ftp://%HOSTIP:%FTPPORT/116 -P 1.2.3.4
33 </command>
34 </client>
35
36 # Verify data after the test has been "shot"
37 <verify>
38 <errorcode>
39 30
40 </errorcode>
41 # Strip the port number but leave the rest
42 <strippart>
43 s/^(PORT \d{1,3},\d{1,3},\d{1,3},\d{1,3},)\d{1,3},\d{1,3}/$1/
44 s/^(EPRT \|1\|\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3}\|)\d{1,5}\|/$1/
45 </strippart>
46 <protocol>
47 USER anonymous
48 PASS ftp@example.com
49 PWD
50 EPRT |1|1.2.3.4|
51 PORT 1,2,3,4,
52 QUIT
53 </protocol>
54 </verify>
55 </testcase>