wget-dev
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: wget2 | CIDR support added for No Proxy. Testing Code Added (!521)


From: @rockdaboot
Subject: Re: wget2 | CIDR support added for No Proxy. Testing Code Added (!521)
Date: Sun, 21 May 2023 17:37:13 +0000



Tim Rühsen started a new discussion on libwget/http.c: 
https://gitlab.com/gnuwget/wget2/-/merge_requests/521#note_1398798926

>               if (!strcmp(no_proxy, host))
>                       return 1; // exact match
>  
> +             struct in_addr addr;
> +             if (inet_pton(AF_INET, host, &addr) != 1){
> +                     continue;
> +             }
> +             bool result = wget_http_cidr_match(no_proxy, &addr);
> +             if (result) {
> +                     return result;
> +             }

Since we only support IPv4 CIDRs for now, we must not run the CIDR check for 
non-IPv4 addresses.

```suggestion:-7+0
                struct in_addr addr;
                if (inet_pton(AF_INET, host, &addr) == 1) {
                        if (wget_http_cidr_match(no_proxy, &addr))
                                return 1;
                }
```

-- 
Reply to this email directly or view it on GitLab: 
https://gitlab.com/gnuwget/wget2/-/merge_requests/521#note_1398798926
You're receiving this email because of your account on gitlab.com.




reply via email to

[Prev in Thread] Current Thread [Next in Thread]