Had a very strange behaviour on 2 systems running with Fedora 10. They were setup to get files for the Phoronix Test Suite with curl and some of the files are in a cache on the lab server, some are on the internet. Accessing the internet requires a proxy, but the proxy is not able to access the lab server due to NAT and a lot of private nets involved. So the basic idea was setting up curl with the following environment variables:
ALL_PROXY="http://172.25.159.4:81" (the proxy for internet access)
NO_PROXY="192.168.2.1" ()the IP of the lab server)
This works perfectly on one machine while the other wants to connect the proxy whatever I do. Digging deep into the differences of the 2 installations it came out that the "bad" system had a GNOME proxy configuration which resulted in the environment variable
If I wipe out this variable the system works as expected and if I add 192.168.2.1 to it (since the man page says "hosts" and not "networks") it works too.
So the flaw is the man page that tells everything about the NO_PROXY environment variable (all capital letters) while the source lib/url.c shows that "no_proxy" is disabling the use of the NO_PROXY settings. So either change the code that both variables are read or change the man page so that it mentions no_proxy to be prefered over NO_PROXY.