mirror of
https://github.com/mirror/wget.git
synced 2025-01-26 12:20:15 +08:00
* src/host.c (sufmatch): Fix dot-prefixed domain matching
Current sufmatch does not match when domain is dot-prefixed. The example of no_proxy in man (.mit.edu) does use a dot-prefixed domain. Signed-off-by: Luiz Angelo Daros de Luca <luizluca@gmail.com> Copyright-paperwork-exempt: Yes
This commit is contained in:
parent
21daa24e72
commit
fd85ac9cc6
@ -1033,8 +1033,9 @@ sufmatch (const char **list, const char *what)
|
||||
/* Domain or subdomain match
|
||||
* k == -1: exact match
|
||||
* k >= 0 && what[k] == '.': subdomain match
|
||||
* k >= 0 && list[i][0] == '.': dot-prefixed subdomain match
|
||||
*/
|
||||
if (j == -1 && (k == -1 || what[k] == '.'))
|
||||
if (j == -1 && (k == -1 || what[k] == '.' || list[i][0] == '.'))
|
||||
return true;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user