[libav-bugs] [Bug 423] New: no_proxy environment variable implemented wrong

bugzilla-daemon at aruru.libav.org bugzilla-daemon at aruru.libav.org
Thu Jan 10 20:54:51 CET 2013


https://bugzilla.libav.org/show_bug.cgi?id=423

           Summary: no_proxy environment variable implemented wrong
           Product: Libav
           Version: git HEAD
          Platform: All
        OS/Version: Linux
            Status: NEW
          Severity: enhancement
          Priority: Normal
         Component: libavformat
        AssignedTo: bugzilla at libav.org
        ReportedBy: divVerent at xonotic.org


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

-- 
Configure bugmail: https://bugzilla.libav.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are watching all bug changes.


More information about the libav-bugs mailing list