Discussion:
http_proxy and https_proxy
Clemens Buchacher
2012-01-31 19:49:55 UTC
Permalink
Hi,

I was struggling a few hours to get my http proxy to work with git,
which uses libcurl. My mistake was that I had set only the http_proxy
env variable, but I was trying to clone an https:// url.

I think this is an easy mistake, and in my experience an http proxy
server is also an https proxy server. Would you accept a patch to make
curl fall back to http_proxy if neither https_proxy nor all_proxy are
set? Or do you think this should be handled by git? Or not at all?

Cheers,
Clemens
-------------------------------------------------------------------
List admin: http://cool.haxx.se/list/listinfo/curl-library
Etiquette: http://curl.haxx.se/mail/etiquette.html
Daniel Stenberg
2012-01-31 22:42:02 UTC
Permalink
I was struggling a few hours to get my http proxy to work with git, which
uses libcurl. My mistake was that I had set only the http_proxy env
variable, but I was trying to clone an https:// url.
I think this is an easy mistake, and in my experience an http proxy server
is also an https proxy server.
Well, yes, but the name of the environment variable is for the protocol the
given URL is using not the protocol that is used to communicate with the
proxy!
Would you accept a patch to make curl fall back to http_proxy if neither
https_proxy nor all_proxy are set? Or do you think this should be handled by
git? Or not at all?
curl has supported these environment variables almost from the start and this
is the first time I read your suggestion. To me that is a small hint that
perhaps this issue isn't that big and might be better off left as-is...

But I'm open to listen to what others have to say!
--
/ daniel.haxx.se
-------------------------------------------------------------------
List admin: http://cool.haxx.se/list/listinfo/curl-library
Etiquette: http://curl.haxx.se/mail/etiquette.html
Johannes Bauer
2012-02-01 14:38:21 UTC
Permalink
Post by Daniel Stenberg
Would you accept a patch to make curl fall back to http_proxy if
neither https_proxy nor all_proxy are set? Or do you think this should
be handled by git? Or not at all?
[...]
Post by Daniel Stenberg
But I'm open to listen to what others have to say!
Please don't include this.

The rationale is as follows: interpretation of command-line parameters
is confusing enough in Unixoid environments already. There are
applications that use various spellings of the common proxy environment
variables (with underscore and without, all uppercase or all lowercase).
Precedence of these variable if in conflict (i.e. what if ALL_PROXY and
http_proxy is set at the same time? What if socks_proxy is also set?)
also differs over applications, which makes matters worse.

To sum it all up and to reiterate my point: Envrionment variables to
change proxy settings are confusing enough already without yet another
special set of exceptions and/or rules. Please keep the KISS principle
in mind.

All the best,
Joe
-------------------------------------------------------------------
List admin: http://cool.haxx.se/list/listinfo/curl-library
Etiquette: http://curl.haxx.se/mail/etiquette.html

Continue reading on narkive:
Loading...