mirror of
https://github.com/curl/curl.git
synced 2026-08-26 03:13:31 +03:00
NO_PROXY: fix for IPv6 numericals in the URL
Added test 1265 that verifies. Reported-by: steelman on github Fixes #2353 Closes #2355
This commit is contained in:
parent
8b0b1a3088
commit
b7f90470be
3 changed files with 63 additions and 2 deletions
10
lib/url.c
10
lib/url.c
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue