id	summary	reporter	owner	description	type	status	priority	component	version	resolution	keywords	cc	blockedby	blocking	reproduced	analyzed
2129	no_proxy environment variable implemented wrong	divVerent		"Summary of the bug:
no_proxy is defined as an exclusion list; however, to ffmpeg, this variable disables proxy support entirely

How to reproduce:
{{{
% strace -fe connect ffplay ""http://192.0.2.42/foo.mp3""
[pid  4727] connect(6, {sa_family=AF_INET, sin_port=htons(80), sin_addr=inet_addr(""192.0.2.42"")}, 16) = -1 EINPROGRESS (Operation now in progress)
# no proxy is used. good

% env http_proxy=""http://192.0.2.23:8080"" strace -fe connect ffplay ""http://192.0.2.42/foo.mp3""
[pid  4658] connect(6, {sa_family=AF_INET, sin_port=htons(8080), sin_addr=inet_addr(""192.0.2.23"")}, 16) = -1 EINPROGRESS (Operation now in progress)
# proxy is properly used, good

% env http_proxy=""http://192.0.2.23:8080"" no_proxy=""192.0.2.42"" strace -fe connect ffplay ""http://192.0.2.42/foo.mp3""
[pid  4837] connect(6, {sa_family=AF_INET, sin_port=htons(80), sin_addr=inet_addr(""192.0.2.42"")}, 16) = -1 EINPROGRESS (Operation now in progress)
# proxy is not used, good

env http_proxy=""http://192.0.2.23:8080"" no_proxy=""192.0.2.123"" strace -fe connect ffplay ""http://192.0.2.42/foo.mp3""
[pid  4894] connect(6, {sa_family=AF_INET, sin_port=htons(80), sin_addr=inet_addr(""192.0.2.42"")}, 16) = -1 EINPROGRESS (Operation now in progress)
# proxy is not used, BAD!
}}}

Cause in the source, to be found in libavformat/tls.c and libavformat/http.c:
{{{
    proxy_path = getenv(""http_proxy"");
    use_proxy = (proxy_path != NULL) && !getenv(""no_proxy"") &&
        av_strstart(proxy_path, ""http://"", NULL);
}}}

Actually, the no_proxy variable would need parsing and comparing to the URL!

See here:
http://www.w3.org/Daemon/User/Proxies/ProxyClients.html
http://lynx.isc.org/lynx2.8.6/lynx2-8-6/lynx_help/keystrokes/environments.html
curl(1)
wget(1)
http://www.gnu.org/software/emacs/manual/html_node/url/Proxies.html"	defect	open	normal	avformat	git-master		http				0	1
