wget-dev
[Top][All Lists]
Advanced

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

Re: wget2 | Draft: CIDR support added for No Proxy. Testing Code Added (


From: @rockdaboot
Subject: Re: wget2 | Draft: CIDR support added for No Proxy. Testing Code Added (!521)
Date: Fri, 14 Apr 2023 12:14:14 +0000



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

>               if (!strcmp(no_proxy, host))
>                       return 1; // exact match
>  
> +             char *cidr_present = strchr(no_proxy, '/');
> +             if (cidr_present) {
> +                     struct in_addr addr;
> +                     inet_aton(host, &addr);
> +                     bool result = wget_http_cidr_match(no_proxy, &addr);
> +                     if (result) {
> +                             return result;
> +                     }
> +             }

```suggestion:-8+0
                bool result = wget_http_cidr_match(no_proxy, &addr);
                if (result)
                        return result;
```
This saves a redundant check (it is done in `wget_http_cidr_match`).

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




reply via email to

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