ftpd reset restart position (REST) at any command

From: Slawa Olhovchenkov <slw_at_zxy.spb.ru>
Date: Wed, 15 Aug 2012 22:50:32 +0400
I try using mirror 2.9 (old, very old perl script) to mirror ftp site
in passive mode and see don't working restart transfer: server ignored
'REST pos' command.

This because in ftpcmd.y cleared restart_point:

cmd_list
        : /* empty */
        | cmd_list cmd
                {
                        if (fromname)
                                free(fromname);
                        fromname = NULL;
                        restart_point = 0;
                }
        | cmd_list rcmd
        ;

(cmd is any command execept RNFR and REST) and mirror in passive mode
used next command sequence:

REST pos
PASV
RETR file

RFC 3659 allow this, but not recomeded:

"The server-PI may react to a badly positioned REST command by ....
save the restart value and apply it to the next data transfer command
..."

Why this case (save the restart value) is bad choice?
Received on Wed Aug 15 2012 - 16:48:14 UTC

This archive was generated by hypermail 2.4.0 : Wed May 19 2021 - 11:40:29 UTC