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/http.c | |
parent | 085bd039bb095cdf35ef41932eebbc428c5caa76 (diff) | |
parent | 5c8696555abd30a200d0d882e2913f66619fba68 (diff) |
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/http.c')
-rw-r--r-- | libavformat/http.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/libavformat/http.c b/libavformat/http.c index 0700eac815..59460005d3 100644 --- a/libavformat/http.c +++ b/libavformat/http.c @@ -120,10 +120,6 @@ static int http_open_cnx(URLContext *h) HTTPAuthType cur_auth_type, cur_proxy_auth_type; HTTPContext *s = h->priv_data; - proxy_path = getenv("http_proxy"); - use_proxy = (proxy_path != NULL) && !getenv("no_proxy") && - av_strstart(proxy_path, "http://", NULL); - /* fill the dest addr */ redo: /* needed in any case to build the host string */ @@ -132,6 +128,10 @@ static int http_open_cnx(URLContext *h) path1, sizeof(path1), s->location); ff_url_join(hoststr, sizeof(hoststr), NULL, NULL, hostname, port, NULL); + proxy_path = getenv("http_proxy"); + use_proxy = !ff_http_match_no_proxy(getenv("no_proxy"), hostname) && + proxy_path != NULL && av_strstart(proxy_path, "http://", NULL); + if (!strcmp(proto, "https")) { lower_proto = "tls"; use_proxy = 0; |