Blame SOURCES/wget-1.19.5-no_proxy-dot-prefix.patch

4207c6
commit fd85ac9cc623847e9d94d9f9241ab34e2c146cbf
4207c6
Author: Luiz Angelo Daros de Luca <luizluca@gmail.com>
4207c6
Date:   Thu Oct 25 17:39:52 2018 -0300
4207c6
4207c6
    * src/host.c (sufmatch): Fix dot-prefixed domain matching
4207c6
    
4207c6
    Current sufmatch does not match when domain is dot-prefixed.
4207c6
    The example of no_proxy in man (.mit.edu) does use a dot-prefixed
4207c6
    domain.
4207c6
    
4207c6
    Signed-off-by: Luiz Angelo Daros de Luca <luizluca@gmail.com>
4207c6
    Copyright-paperwork-exempt: Yes
4207c6
4207c6
diff --git a/src/host.c b/src/host.c
4207c6
index b42cd6e8..2bf848f3 100644
4207c6
--- a/src/host.c
4207c6
+++ b/src/host.c
4207c6
@@ -1033,8 +1033,9 @@ sufmatch (const char **list, const char *what)
4207c6
       /* Domain or subdomain match
4207c6
        * k == -1: exact match
4207c6
        * k >= 0 && what[k] == '.': subdomain match
4207c6
+       * k >= 0 && list[i][0] == '.': dot-prefixed subdomain match
4207c6
        */
4207c6
-      if (j == -1 && (k == -1 || what[k] == '.'))
4207c6
+      if (j == -1 && (k == -1 || what[k] == '.' || list[i][0] == '.'))
4207c6
         return true;
4207c6
     }
4207c6