If no_proxy condition is true && urltype == FTP_URL_T, use fetch_ftp to retrieve.

This commit is contained in:
tacha 2001-10-15 05:05:43 +00:00
parent af6420c46f
commit a2ffc24485
1 changed files with 7 additions and 3 deletions

View File

@ -1,4 +1,4 @@
/* $NetBSD: fetch.c,v 1.126 2001/02/19 23:03:45 cgd Exp $ */
/* $NetBSD: fetch.c,v 1.127 2001/10/15 05:05:43 tacha Exp $ */
/*-
* Copyright (c) 1997-2000 The NetBSD Foundation, Inc.
@ -41,7 +41,7 @@
#include <sys/cdefs.h>
#ifndef lint
__RCSID("$NetBSD: fetch.c,v 1.126 2001/02/19 23:03:45 cgd Exp $");
__RCSID("$NetBSD: fetch.c,v 1.127 2001/10/15 05:05:43 tacha Exp $");
#endif /* not lint */
/*
@ -419,7 +419,7 @@ sigjmp_buf httpabort;
* If proxyenv is set, use that for the proxy, otherwise try ftp_proxy or
* http_proxy as appropriate.
* Supports HTTP redirects.
* Returns -1 on failure, 0 on completed xfer, 1 if ftp connection
* Returns 1 on failure, 0 on completed xfer, -1 if ftp connection
* is still open (e.g, ftp xfer with trailing /)
*/
static int
@ -600,6 +600,10 @@ fetch_url(const char *url, const char *proxyenv, char *proxyauth, char *wwwauth)
}
}
FREEPTR(np_copy);
if (isproxy == 0 && urltype == FTP_URL_T) {
rval = fetch_ftp(url);
goto cleanup_fetch_url;
}
}
if (isproxy) {