patch-url.c - pkgsrc-localpatches - leot's pkgsrc LOCALPATCHES
 (HTM) hg clone https://bitbucket.org/iamleot/pkgsrc-localpatches
 (DIR) Log
 (DIR) Files
 (DIR) Refs
       ---
       patch-url.c
       ---
            1 $NetBSD$
            2 
            3 Do not send User-Agent: header if the UserAgent is not set.
            4 
            5 --- url.c.orig  2018-01-25 09:24:48.000000000 +0000
            6 +++ url.c
            7 @@ -1320,12 +1320,11 @@ otherinfo(ParsedURL *target, ParsedURL *
            8      const int *no_referer_ptr;
            9      int no_referer;
           10  
           11 -    Strcat_charp(s, "User-Agent: ");
           12 -    if (UserAgent == NULL || *UserAgent == '\0')
           13 -       Strcat_charp(s, w3m_version);
           14 -    else
           15 +    if (UserAgent != NULL && *UserAgent != '\0') {
           16 +        Strcat_charp(s, "User-Agent: ");
           17         Strcat_charp(s, UserAgent);
           18 -    Strcat_charp(s, "\r\n");
           19 +        Strcat_charp(s, "\r\n");
           20 +    }
           21  
           22      Strcat_m_charp(s, "Accept: ", AcceptMedia, "\r\n", NULL);
           23      Strcat_m_charp(s, "Accept-Encoding: ", AcceptEncoding, "\r\n", NULL);