cURL / Mailing Lists / curl-users / Single Mail



From: Daniel Stenberg <>
Date: Mon, 10 Dec 2001 11:57:01 +0100 (MET)

On Mon, 10 Dec 2001, Björn Stenberg wrote:

> I can't get curl (7.8) to use the HTTP_PROXY environment variable. Very
> strange:
> $ env | grep PROXY
> HTTP_PROXY=int-proxy1:8080
> FTP_PROXY=postal:8080
> $ curl -I
> <nothing happens for 10-15 seconds, so I press Ctrl-C>


> So ALL_PROXY and the -x option works, but not HTTP_PROXY?

Yes. That's actually the expected behavior, believe it or not! ;-)

The variable "HTTP_PROXY", using all caps, is no longer permitted/understood
(since 7.7.2 actually). Here's why:

When CGI scripts get executed from within web servers, they usually get
environment variables set before the script is executed. Headers in the
incoming request that activate the script get converted to variables named

So, if anyone wrote a CGI script that in turn was using curl, you could
actually trick curl to use a http proxy of your choice by passing a 'Proxy:
[yada yada]' header.

http_proxy', using lower case, on the other hand is perfectly understood by

    Daniel Stenberg -- curl groks URLs --
Received on 2001-12-10