Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 15 Aug 2012 22:50:32 +0400
From:      Slawa Olhovchenkov <slw@zxy.spb.ru>
To:        current@FreeBSD.org, stable@FreeBSD.org
Subject:   ftpd reset restart position (REST) at any command
Message-ID:  <20120815185032.GB88729@zxy.spb.ru>

next in thread | raw e-mail | index | archive | help
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?



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20120815185032.GB88729>