diff options
author | Daniel Stenberg <daniel@haxx.se> | 2018-03-03 14:12:35 +0100 |
---|---|---|
committer | Daniel Stenberg <daniel@haxx.se> | 2018-03-04 19:50:48 +0100 |
commit | b7f90470be9b75f57167abbcd63aadb2e3b33958 (patch) | |
tree | cd53f189614e8bd84e483c4c1e3e73133a7602ec /lib | |
parent | 8b0b1a30881590e70082784e16f3c2c66d88b218 (diff) | |
download | curl-b7f90470be9b75f57167abbcd63aadb2e3b33958.tar.gz |
NO_PROXY: fix for IPv6 numericals in the URL
Added test 1265 that verifies.
Reported-by: steelman on github
Fixes #2353
Closes #2355
Diffstat (limited to 'lib')
-rw-r--r-- | lib/url.c | 10 |
1 files changed, 9 insertions, 1 deletions
@@ -2574,7 +2574,15 @@ static bool check_noproxy(const char *name, const char *no_proxy) /* NO_PROXY was specified and it wasn't just an asterisk */ no_proxy_len = strlen(no_proxy); - endptr = strchr(name, ':'); + if(name[0] == '[') { + /* IPv6 numerical address */ + endptr = strchr(name, ']'); + if(!endptr) + return FALSE; + name++; + } + else + endptr = strchr(name, ':'); if(endptr) namelen = endptr - name; else |