From 2e88106bd16bb8395c10e66a8803386fc2d1b968 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Dag-Erling=20Sm=C3=B8rgrav?= Date: Fri, 21 Jul 2000 10:25:33 +0000 Subject: [PATCH] Don't send port number to proxy unless it's not the standard FTP port --- lib/libfetch/ftp.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/lib/libfetch/ftp.c b/lib/libfetch/ftp.c index 05f429bd9119..de7d2d8db1b0 100644 --- a/lib/libfetch/ftp.c +++ b/lib/libfetch/ftp.c @@ -651,8 +651,12 @@ _ftp_connect(char *host, int port, char *user, char *pwd, char *flags) /* send user name and password */ if (!user || !*user) user = FTP_ANONYMOUS_USER; - e = p ? _ftp_cmd(cd, "USER %s@%s@%d", user, host, port) - : _ftp_cmd(cd, "USER %s", user); + if (p && port == FTP_DEFAULT_PORT) + e = _ftp_cmd(cd, "USER %s@%s", user, host); + else if (p) + e = _ftp_cmd(cd, "USER %s@%s@%d", user, host, port); + else + e = _ftp_cmd(cd, "USER %s", user); /* did the server request a password? */ if (e == FTP_NEED_PASSWORD) {