tech-userlevel archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Ecessive use of PWD command in /usr/bin/ftp



Our ftp client likes to be aggressive in issuing PWD commands, almost
every time it does just about anything (slight exaggeration, but the
client does it a lot).

That fails with some (almost certainly broken - but still) ftp servers
which (for whatever reason) are unable to cope.   (If you care,
see the thread with Subject: libassuan2 on pkgsrc-users in the past
couple of hours.)

The PWD commands seem to have almost no practical purpose - they allow
a user issued pwd command to be answered without communicating with the
server, and they also allow the % escapes (%c %. and %/) in the prompt to
include the remote directory (which I doubt almost anyone ever uses) without
consulting the server.

Does anyone have any objection if I delete the aggressive PWD use, and
instead issue a PWD command only when one is needed - that is, to answer
a pwd user command (when the remote directory is unknown - that is, only
one PWD will be sent, no matter how many times the user types pwd, unless
the directory has been changed) or when needed for the % sequence in the
prompt (again, if it is not currently known) ?

This will allow the typical modern

	ftp ftp://...

to run with no PWD commands at all - saving several round trips to the
server.

When required (for either of the above purposes) a PWD command will be
issued (and the result remembered until a command that changes the remote
directory is issued.)

kre



Home | Main Index | Thread Index | Old Index