1<testcase>
2<info>
3<keywords>
4FTP
5PORT
6NLST
7--data-binary
8</keywords>
9</info>
10# Server-side
11<reply>
12<data>
13contents
14</data>
15<servercmd>
16REPLY PWD 257 there is rubbish all over "/this/is/the/path"
17</servercmd>
18</reply>
19
20# Client-side
21<client>
22<server>
23ftp
24</server>
25 <name>
26FTP with rubbish before name in 257-response
27 </name>
28 <command>
29ftp://%HOSTIP:%FTPPORT/get/file/1217 ftp://%HOSTIP:%FTPPORT/get/file/again/1217 --ftp-method singlecwd
30</command>
31</client>
32
33# Verify data after the test has been "shot"
34<verify>
35# Strip all valid kinds of PORT and EPRT that curl can send
36<strip>
37^PORT \d{1,3},\d{1,3},\d{1,3},\d{1,3},\d{1,3},\d{1,3}
38^EPRT \|1\|\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3}\|\d{1,5}\|
39</strip>
40<protocol>
41USER anonymous
42PASS ftp@example.com
43PWD
44CWD get/file
45EPSV
46TYPE I
47SIZE 1217
48RETR 1217
49CWD /this/is/the/path
50CWD get/file/again
51EPSV
52SIZE 1217
53RETR 1217
54QUIT
55</protocol>
56</verify>
57</testcase>
58