I know in unix/linux the enviroment variables are uppercase, like LD_LIBRARY_PATH ; HOME ; $USER
and so on. Today playing with wget I saw this commands just uses lowercase enviroment variables:
env | grep -i proxy
http_proxy=http://10.0.0.120:8080
wget -q http://google.it
echo $?
0
unset http_proxy
export HTTP_PROXY=http://10.0.0.120:8080
wget -q http://google.it
echo $?
1
Why wget doesn't read HTTP_PROXY
in uppercase format?
This is just a guess, but project timelines would suggest that it's for backwards compatibility with Lynx, which predates curl by a few years (and which uses lower-case proxy variables).
Short answer: Unfortunately, different programs use different
env
variables.Long answer, from (https://wiki.archlinux.org/index.php/proxy_settings#Environment_variables):
In the past, I've made a simple script that sets both versions (all caps and "regular" versions to toggle them on and off easily, and it seems that that is a common way of doing things if it must be done via
env
variables.Unix is case sensitive. Which means that $http_proxy and $HTTP_PROXY are two different variables.
Look at this: