From owner-freebsd-bugs Wed Apr 22 03:40:01 1998 Return-Path: Received: (from majordom@localhost) by hub.freebsd.org (8.8.8/8.8.8) id DAA12425 for freebsd-bugs-outgoing; Wed, 22 Apr 1998 03:40:01 -0700 (PDT) (envelope-from owner-freebsd-bugs@FreeBSD.ORG) Received: (from gnats@localhost) by hub.freebsd.org (8.8.8/8.8.8) id DAA12418; Wed, 22 Apr 1998 03:40:00 -0700 (PDT) (envelope-from gnats) Date: Wed, 22 Apr 1998 03:40:00 -0700 (PDT) Message-Id: <199804221040.DAA12418@hub.freebsd.org> To: freebsd-bugs Cc: From: Martin Cracauer Subject: Re: bin/6371: fetch(1) uses HTTP_PROXY for ftp requests when FTP_PROXY undefined Reply-To: Martin Cracauer Sender: owner-freebsd-bugs@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.org The following reply was made to PR bin/6371; it has been noted by GNATS. From: Martin Cracauer To: dchapes@ddm.on.ca, FreeBSD-gnats-submit@FreeBSD.ORG Cc: Subject: Re: bin/6371: fetch(1) uses HTTP_PROXY for ftp requests when FTP_PROXY undefined Date: Wed, 22 Apr 1998 12:32:45 +0200 In <199804210420.AAA08216@squigy.ddm.on.ca>, dchapes@ddm.on.ca wrote: > I have a local Squid cache which I want fetch(1) to use for HTTP > requests but not for FTP requests (the cache has ftp access disabled). > If I just set the HTTP_PROXY variable fetch(1) uses the proxy for > both. I couldn't find an easy way to tell fetch(1) not to use the proxy > without undefining HTTP_PROXY. > > >How-To-Repeat: > > % setenv HTTP_PROXY somewhere > % unsetenv FTP_PROXY > % fetch ftp://somehost/some/path > > fetch(1) will use the HTTP_PROXY for the ftp request. Your solution didn't take into account that there are two things to control: - The kind of url a proxy is being used for - The kind of protocol to speak to the proxy Theres are the cases to consider: 1) I have two proxies. One that speaks http to the client and serves http urls. And one that use ftp to talk to the client and should be used for ftp urls. This is what fetch expects when both variables are set. 2) I have a proxy that uses the http protocol to talk to the client and serves http requests only. The client should not use any proxy when fetching ftp urls. That is your situation and not covered by the current fetch. 3) I have a proxy that uses the http protocol and serves http and ftp requests. That means, you can get ftp urls by using http to talk to your proxy. This is what fetch does when HTTP_PROXY is set, but FTP_PROXY isn't. You fix breaks case 3, which is a pretty common one, IMHO. I at least use such a proxy. Case 2 is usually a bad situation since some client software use http only to talk to proxies. What we need here is a standard for $..._PROXY environment variables that allows us to control the protocol and the kind of url seperatly, preferrably without breaking older clients. Martin -- %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% Martin Cracauer http://www.cons.org/cracauer BSD User Group Hamburg, Germany http://www.bsdhh.org/ To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-bugs" in the body of the message