curl-library
http_proxy not working quite right
Date: Tue, 16 Jan 2007 15:48:09 -0800
I've just noticed a problem with the http_proxy environment variable
that caused test case 63 to fail on one machine I tried it on. Here's a
log (192.168.0.128:80 actually is just a plain web server, not a proxy, and
test-url doesn't actually exist, but that doesn't affect things):
$ env http_proxy=http://192.168.0.128:80/ ../src/curl -v http://adelie/test-url
* About to connect() to proxy 192.168.0.128 port 80 (#0)
* Trying 192.168.0.29... connected
* Connected to (nil) (192.168.0.29) port 80 (#0)
> GET http://adelie/test-url HTTP/1.1
[etc]
It seems curl is a bit confused here. It claims to be going to use the proxy
server, but it actually connect()s to the request URL server
(adelie=192.168.0.29).
Here's the equivalent using the --proxy argument:
$ ../src/curl -v --proxy 192.168.0.128:80 http://adelie/test-url
* About to connect() to proxy 192.168.0.128 port 80 (#0)
* Trying 192.168.0.128... connected
* Connected to 192.168.0.128 (192.168.0.128) port 80 (#0)
> GET http://adelie/test-url HTTP/1.1
[etc]
That's what I would expect to see. About to connect() equals the actual
connect. I wonder if this came about as part of the http_proxy fix that was
made a couple of weeks ago? These tests were with a recent CVS version:
$ ../src/curl --version
curl 7.16.1-CVS (i686-pc-linux-gnu) libcurl/7.16.1-CVS OpenSSL/0.9.6b zlib/1.1.4 libidn/0.4.6
Protocols: tftp ftp telnet dict ldap http file https ftps
Features: Debug IDN IPv6 Largefile NTLM SSL libz
>>> Dan
-- http://www.MoveAnnouncer.com The web change of address service Let webmasters know that your web site has movedReceived on 2007-01-17