Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 22 Apr 1998 03:40:00 -0700 (PDT)
From:      Martin Cracauer <cracauer@cons.org>
To:        freebsd-bugs
Subject:   Re: bin/6371: fetch(1) uses HTTP_PROXY for ftp requests when FTP_PROXY undefined
Message-ID:  <199804221040.DAA12418@hub.freebsd.org>

next in thread | raw e-mail | index | archive | help
The following reply was made to PR bin/6371; it has been noted by GNATS.

From: Martin Cracauer <cracauer@cons.org>
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 <cracauer@cons.org> 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



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199804221040.DAA12418>