From nobody@FreeBSD.org  Thu Mar 11 08:31:22 2004
Return-Path: <nobody@FreeBSD.org>
Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125])
	by hub.freebsd.org (Postfix) with ESMTP id 1086C16A4CE
	for <freebsd-gnats-submit@FreeBSD.org>; Thu, 11 Mar 2004 08:31:22 -0800 (PST)
Received: from www.freebsd.org (www.freebsd.org [216.136.204.117])
	by mx1.FreeBSD.org (Postfix) with ESMTP id 0B51943D31
	for <freebsd-gnats-submit@FreeBSD.org>; Thu, 11 Mar 2004 08:31:22 -0800 (PST)
	(envelope-from nobody@FreeBSD.org)
Received: from www.freebsd.org (localhost [127.0.0.1])
	by www.freebsd.org (8.12.10/8.12.10) with ESMTP id i2BGVL72044262
	for <freebsd-gnats-submit@FreeBSD.org>; Thu, 11 Mar 2004 08:31:21 -0800 (PST)
	(envelope-from nobody@www.freebsd.org)
Received: (from nobody@localhost)
	by www.freebsd.org (8.12.10/8.12.10/Submit) id i2BGVLcn044261;
	Thu, 11 Mar 2004 08:31:21 -0800 (PST)
	(envelope-from nobody)
Message-Id: <200403111631.i2BGVLcn044261@www.freebsd.org>
Date: Thu, 11 Mar 2004 08:31:21 -0800 (PST)
From: Pat Wendorf <beholder@dungeons.ca>
To: freebsd-gnats-submit@FreeBSD.org
Subject: libfetch does not use the FTP_PROXY and HTTP_PROXY vars as documented
X-Send-Pr-Version: www-2.3

>Number:         64111
>Category:       misc
>Synopsis:       libfetch does not use the FTP_PROXY and HTTP_PROXY vars as documented
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    des
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Thu Mar 11 08:40:14 PST 2004
>Closed-Date:    Mon May 17 01:52:09 PDT 2004
>Last-Modified:  Mon May 17 01:52:09 PDT 2004
>Originator:     Pat Wendorf
>Release:        4.9-RELEASE
>Organization:
>Environment:
FreeBSD unixweb 4.9-RELEASE FreeBSD 4.9-RELEASE #0: Fri Feb 20 10:27:40 EST 2004     beholder@unixweb:/usr/src/sys/compile/UNIXWEB  i386
>Description:
The documentation for fetch (man 3 fetch) indicates that setting HTTP_PROXY will only let fetch requests for HTTP resources run through the proxy server.  We have a setup where FTP is open to us, but HTTP is proxied.  With this variable set HTTP and FTP seem to go through the proxy first.  Unsetting the variable fixes FTP, but does not allow me to us HTTP.
>How-To-Repeat:
Allow FTP out through your network, and proxy HTTP.  Set the HTTP_PROXY environment variable and watch where the FTP requests go out through.
>Fix:

>Release-Note:
>Audit-Trail:

From: Gleb Smirnoff <glebius@cell.sick.ru>
To: Pat Wendorf <beholder@dungeons.ca>
Cc: freebsd-gnats-submit@freebsd.org
Subject: Re: misc/64111: libfetch does not use the FTP_PROXY and HTTP_PROXY vars as documented
Date: Wed, 17 Mar 2004 11:07:59 +0300

 On Thu, Mar 11, 2004 at 08:31:21AM -0800, Pat Wendorf wrote:
 P> >Description:
 P> The documentation for fetch (man 3 fetch) indicates that setting HTTP_PROXY will only let fetch requests for HTTP resources run through the proxy server.  We have a setup where FTP is open to us, but HTTP is proxied.  With this variable set HTTP and FTP seem to go through the proxy first.  Unsetting the variable fixes FTP, but does not allow me to us HTTP.
 P> >How-To-Repeat:
 P> Allow FTP out through your network, and proxy HTTP.  Set the HTTP_PROXY environment variable and watch where the FTP requests go out through.
 
 This is not a bug, its a feature. libfetch tries to use you HTTP proxy for FTP
 transfers, too. If you don't want to use it for FTP, you have explicitly set
 environment variable FTP_PROXY to empty string.
 
 A command like:
 
 > FTP_PROXY= fetch <ftp url>
 
 will work in your case.
 
 If you are using make.conf, your configuration will look like this:
 
 FETCH_ENV?=     HTTP_PROXY=proxy:3128
 FETCH_ENV+=     FTP_PROXY=
 
 However, fetch.3 says:
 
                          If this variable is set to an empty string, no proxy
                          will be used for FTP requests, even if the HTTP_PROXY
                          variable is set.
 
 And this is definitely not true. So, this issue must be considered a doc-bug.
 
 Here is diff:
 
 --- fetch.3.orig        Wed Mar 17 11:05:32 2004
 +++ fetch.3     Wed Mar 17 11:07:08 2004
 @@ -471,11 +471,6 @@
  is the real user name, and
  .Ql host
  is the name of the FTP server.
 -.Pp
 -If this variable is set to an empty string, no proxy will be used for
 -FTP requests, even if the
 -.Ev HTTP_PROXY
 -variable is set.
  .It Ev ftp_proxy
  Same as
  .Ev FTP_PROXY ,
 
 -- 
 Totus tuus, Glebius.
 GLEBIUS-RIPN GLEB-RIPE

From: Gleb Smirnoff <glebius@cell.sick.ru>
To: freebsd-gnats-submit@freebsd.org
Cc:  
Subject: Re: misc/64111: libfetch does not use the FTP_PROXY and HTTP_PROXY vars as documented
Date: Wed, 17 Mar 2004 15:08:03 +0300

 On Wed, Mar 17, 2004 at 12:10:19AM -0800, Gleb Smirnoff wrote:
 T>  However, fetch.3 says:
 T>  
 T>                           If this variable is set to an empty string, no proxy
 T>                           will be used for FTP requests, even if the HTTP_PROXY
 T>                           variable is set.
 T>  
 T>  And this is definitely not true. So, this issue must be considered a doc-bug.
 
 I'm very sorry! The above statement is correct. But I think there should be
 explicitly said that HTTP_PROXY is used for ftp in absence of FTP_PROXY.
 
 Like this:
 
 			If HTTP_PROXY variable is defined and FTP_PROXY is not,
 			http proxy is used. To avoid this behavior, one should
 			set FTP_PROXY to an empty string. In this case no proxy
 			will be used for FTP requests, even if the HTTP_PROXY
 			variable is set.
 
 Here is patch:
 
 --- fetch.3.orig        Wed Mar 17 11:05:32 2004
 +++ fetch.3     Wed Mar 17 14:43:44 2004
 @@ -472,8 +472,14 @@
  .Ql host
  is the name of the FTP server.
  .Pp
 -If this variable is set to an empty string, no proxy will be used for
 -FTP requests, even if the
 +If
 +.Ev HTTP_PROXY
 +variable is defined and
 +.Ev FTP_PROXY
 +is not, http proxy is used. To avoid this behavior, one should set
 +.Ev FTP_PROXY
 +to an empty string. In this case no proxy will be used for FTP requests,
 +even if the
  .Ev HTTP_PROXY
  variable is set.
  .It Ev ftp_proxy
 
 -- 
 Totus tuus, Glebius.
 GLEBIUS-RIPN GLEB-RIPE
Responsible-Changed-From-To: freebsd-bugs->josef 
Responsible-Changed-By: josef 
Responsible-Changed-When: Sat May 15 14:56:53 PDT 2004 
Responsible-Changed-Why:  
i'll handle this one. 

http://www.freebsd.org/cgi/query-pr.cgi?pr=64111 

From: Michael Nottebrock <michaelnottebrock@gmx.net>
To: freebsd-gnats-submit@FreeBSD.org, beholder@dungeons.ca
Cc:  
Subject: Re: misc/64111: libfetch does not use the FTP_PROXY and HTTP_PROXY vars as documented
Date: Sun, 16 May 2004 16:15:21 +0200

 The bug is actually the other way around as the original reporter describes 
 it, and it's a RELENG_4 vs RELENG_5 issue:
 
 RELENG_4:
 
 [lofi@kiste]:1:/usr/ports/x11-toolkits/qt33 # uname -a
 FreeBSD kiste 4.10-PRERELEASE FreeBSD 4.10-PRERELEASE #0: Mon May 10 04:14:08 
 CEST 2004     lofi@kiste:/usr/obj/usr/src/sys/KISTE-UP  i386
 [lofi@kiste]:0:/usr/ports/x11-toolkits/qt33 # make FETCH_CMD="/usr/bin/fetch 
 -ARrv" FETCH_ENV="HTTP_PROXY=http://lofi:3128" fetch
 ===>  Found saved configuration for qt-3.3.2
 >> qt-x11-free-3.3.1.tar.bz2 doesn't seem to exist 
 in /usr/ports/distfiles/KDE.
 >> Attempting to fetch from ftp://ftp.trolltech.com/qt/source/.
 looking up ftp.trolltech.com
 connecting to ftp.trolltech.com:21
 setting passive mode
 opening data connection
 initiating transfer
 
 Notice how fetch does NOT use the proxy specified in HTTP_PROXY although 
 FTP_PROXY is not set.
 
 RELENG_5:
 
 [lofi@lofi]:0:/usr/ports/x11-toolkits/qt33 # make FETCH_CMD="/usr/bin/fetch 
 -ARrv" FETCH_ENV="HTTP_PROXY=http://localhost:3128" fetch
 >> qt-x11-free-3.3.2.tar.bz2 doesn't seem to exist 
 in /usr/ports/distfiles/KDE.
 >> Attempting to fetch from ftp://ftp.trolltech.com/qt/source/.
 looking up localhost
 connecting to localhost:3128
 requesting ftp://ftp.trolltech.com/qt/source/qt-x11-free-3.3.2.tar.bz2
 remote size / mtime: 14434821 / 1082971751
 
 Here fetch works as documented.
 
 There is some un-MFC'd code in libfetch, perhaps it should just be MFC'd 
 completely.
 
 
 
 
Responsible-Changed-From-To: josef->des 
Responsible-Changed-By: josef 
Responsible-Changed-When: Sun May 16 08:02:15 PDT 2004 
Responsible-Changed-Why:  
des is the maintainer 

http://www.freebsd.org/cgi/query-pr.cgi?pr=64111 

From: des@des.no (=?iso-8859-1?q?Dag-Erling_Sm=F8rgrav?=)
To: freebsd-gnats-submit@freebsd.org
Cc:  
Subject: Re: misc/64111: libfetch does not use the FTP_PROXY and HTTP_PROXY
 vars as documented
Date: Sun, 16 May 2004 18:09:02 +0200

 fetch(1) and fetch(3) behave as advertised on both 4.x and 5.x.  There
 are no differences in the code between RELENG_4 and HEAD except those
 required to account for the lack of <stdint.h> in RELENG_4.  The
 problem described by Michael is most likely a pilot error (perhaps
 FTP_PROXY or ftp_proxy is defined in the environment or make.conf on
 the RELENG_4 system?)
 
 DES
 --=20
 Dag-Erling Sm=F8rgrav - des@des.no

From: Michael Nottebrock <michaelnottebrock@gmx.net>
To: freebsd-gnats-submit@FreeBSD.org, beholder@dungeons.ca
Cc:  
Subject: Re: misc/64111: libfetch does not use the FTP_PROXY and HTTP_PROXY vars as documented
Date: Sun, 16 May 2004 21:43:53 +0200

 Pilot error indeed. Close bug, send pointy hat.
 
State-Changed-From-To: open->closed 
State-Changed-By: des 
State-Changed-When: Mon May 17 01:52:08 PDT 2004 
State-Changed-Why:  
Pilot error. 

http://www.freebsd.org/cgi/query-pr.cgi?pr=64111 
>Unformatted:
