mirror of
https://github.com/curl/curl.git
synced 2026-08-25 07:03:31 +03:00
noproxy: support for space-separated names is deprecated
To be removed in July 2024. Assisted-by: Michael Osipov Fixes #10209 Closes #10215
This commit is contained in:
parent
bb393e521f
commit
7ad8a7ba9e
5 changed files with 88 additions and 44 deletions
|
|
@ -119,8 +119,10 @@ enum nametype {
|
|||
* Checks if the host is in the noproxy list. returns TRUE if it matches and
|
||||
* therefore the proxy should NOT be used.
|
||||
****************************************************************/
|
||||
bool Curl_check_noproxy(const char *name, const char *no_proxy)
|
||||
bool Curl_check_noproxy(const char *name, const char *no_proxy,
|
||||
bool *spacesep)
|
||||
{
|
||||
*spacesep = FALSE;
|
||||
/*
|
||||
* If we don't have a hostname at all, like for example with a FILE
|
||||
* transfer, we have nothing to interrogate the noproxy list with.
|
||||
|
|
@ -244,6 +246,15 @@ bool Curl_check_noproxy(const char *name, const char *no_proxy)
|
|||
if(match)
|
||||
return TRUE;
|
||||
} /* if(tokenlen) */
|
||||
/* pass blanks after pattern */
|
||||
while(ISBLANK(*p))
|
||||
p++;
|
||||
/* if not a comma! */
|
||||
if(*p && (*p != ',')) {
|
||||
*spacesep = TRUE;
|
||||
continue;
|
||||
}
|
||||
/* pass any number of commas */
|
||||
while(*p == ',')
|
||||
p++;
|
||||
} /* while(*p) */
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue