Somewhere along the line, I misunderstood the whole FTP_PASSIVE_MODE debate
and had libfetch selecting passive mode even when FTP_PASSIVE_MODE was not set at all, which is really quite surprising unless you know about it. So change it to the agreed default behaviour of selecting passive mode if FTP_PASSIVE_MODE is set, but not "no".
This commit is contained in:
parent
0138a93062
commit
6c81eb523e
@ -422,9 +422,9 @@ and message, e.g. "File is not available (404 Not Found)"
|
||||
.Sh ENVIRONMENT
|
||||
.Bl -tag -width FTP_PASSIVE_MODE
|
||||
.It Ev FTP_PASSIVE_MODE
|
||||
The FTP code selects passive mode by default.
|
||||
To force active mode FTP, set this variable to
|
||||
.Ql no .
|
||||
If set to anything but
|
||||
.Ql no ,
|
||||
forces the FTP code to use passive mode.
|
||||
.It Ev FTP_PASSWORD
|
||||
Default FTP password if the remote server requests one and none was
|
||||
provided in the URL.
|
||||
|
@ -464,7 +464,7 @@ _ftp_transfer(int cd, char *oper, char *file,
|
||||
|
||||
/* passive mode */
|
||||
if (!pasv)
|
||||
pasv = ((s = getenv("FTP_PASSIVE_MODE")) == NULL ||
|
||||
pasv = ((s = getenv("FTP_PASSIVE_MODE")) != NULL &&
|
||||
strncasecmp(s, "no", 2) != 0);
|
||||
|
||||
/* find our own address, bind, and listen */
|
||||
|
Loading…
Reference in New Issue
Block a user