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

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