| Summary: | libfetch doesn't behave as documented about FTP_PROXY | ||
|---|---|---|---|
| Product: | Base System | Reporter: | SANETO Takanori <sanewo> |
| Component: | bin | Assignee: | Dag-Erling Smørgrav <des> |
| Status: | Closed FIXED | ||
| Severity: | Affects Only Me | ||
| Priority: | Normal | ||
| Version: | 4.2-STABLE | ||
| Hardware: | Any | ||
| OS: | Any | ||
|
Description
SANETO Takanori
2000-11-27 13:10:01 UTC
Responsible Changed From-To: freebsd-bugs->des Des owns libfecth. sanewo@ba2.so-net.ne.jp writes: > On FTP_PROXY environment variable, fetch(3) says "if no scheme is > specified, FTP is assumed." But lib/libfetch/ftp.c sets default > scheme as HTTP. I'm aware of this problem, and will fix it very soon. DES -- Dag-Erling Smorgrav - des@ofug.org I should elaborate a little more - I got a report of the opposite bug
(defaulting to FTP where it previously defaulted to HTTP) shortly
before 4.2-RELEASE, and in the rush to get it fixed in time for the
release, I fixed it the wrong way. The following patch should correct
the problem:
Index: ftp.c
===================================================================
RCS file: /home/ncvs/src/lib/libfetch/ftp.c,v
retrieving revision 1.16.2.14
diff -u -r1.16.2.14 ftp.c
--- ftp.c 2000/11/27 10:15:09 1.16.2.14
+++ ftp.c 2000/11/27 13:27:02
@@ -877,7 +877,10 @@
if (((p = getenv("FTP_PROXY")) || (p = getenv("HTTP_PROXY"))) &&
*p && (purl = fetchParseURL(p)) != NULL) {
if (!*purl->scheme)
- strcpy(purl->scheme, SCHEME_HTTP);
+ if (getenv("FTP_PROXY"))
+ strcpy(purl->scheme, SCHEME_FTP);
+ else
+ strcpy(purl->scheme, SCHEME_HTTP);
if (!purl->port)
purl->port = _fetch_default_proxy_port(purl->scheme);
if (strcasecmp(purl->scheme, SCHEME_FTP) == 0 ||
DES
--
Dag-Erling Smorgrav - des@ofug.org
State Changed From-To: open->feedback Fixed in -CURRENT, awaiting MFC. State Changed From-To: feedback->closed MFCed. |