diff options
author | Michael Niedermayer <michaelni@gmx.at> | 2013-02-28 13:12:04 +0100 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2013-02-28 13:13:04 +0100 |
commit | 03678a32bcb8e1ae5c213e02faf62df166cca05d (patch) | |
tree | 035a1b8ab38470337cf066aae3ab1cc60a03c48b /libavformat/tls.c | |
parent | 085bd039bb095cdf35ef41932eebbc428c5caa76 (diff) | |
parent | 5c8696555abd30a200d0d882e2913f66619fba68 (diff) | |
download | ffmpeg-03678a32bcb8e1ae5c213e02faf62df166cca05d.tar.gz |
Merge remote-tracking branch 'qatar/master'
* qatar/master:
lavf: Add a fate test for the noproxy pattern matching
lavf: Handle the environment variable no_proxy more properly
Conflicts:
libavformat/Makefile
libavformat/internal.h
libavformat/tls.c
libavformat/utils.c
libavformat/version.h
Merged-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavformat/tls.c')
-rw-r--r-- | libavformat/tls.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/libavformat/tls.c b/libavformat/tls.c index 38dd70c9df..2c85d1dedc 100644 --- a/libavformat/tls.c +++ b/libavformat/tls.c @@ -172,10 +172,6 @@ static int tls_open(URLContext *h, const char *uri, int flags) ff_tls_init(); - proxy_path = getenv("http_proxy"); - use_proxy = (proxy_path != NULL) && !getenv("no_proxy") && - av_strstart(proxy_path, "http://", NULL); - av_url_split(NULL, 0, NULL, 0, host, sizeof(host), &port, path, sizeof(path), uri); ff_url_join(buf, sizeof(buf), "tcp", NULL, host, port, "%s", path); @@ -185,6 +181,10 @@ static int tls_open(URLContext *h, const char *uri, int flags) freeaddrinfo(ai); } + proxy_path = getenv("http_proxy"); + use_proxy = !ff_http_match_no_proxy(getenv("no_proxy"), host) && + proxy_path != NULL && av_strstart(proxy_path, "http://", NULL); + if (use_proxy) { char proxy_host[200], proxy_auth[200], dest[200]; int proxy_port; |