#1113762 http_proxy= works but --http-proxy ignored

Package:
wget2
Source:
wget2
Description:
file and recursive website downloader
Submitter:
Trent W. Buck
Date:
2025-09-02 08:55:02 UTC
Severity:
normal
#1113762#5
Date:
2025-09-02 08:53:02 UTC
From:
To:
"man wget2" mentions an option --http-proxy, but it does not work for me.
Using an environment variable still works.
In the demonstration code below, I'm using "apt install apt-cacher-ng" to provide an HTTP proxy.

    bash5$ tail -Fn0 /var/log/apt-cacher-ng/apt-cacher.log &  # if wget2 uses the proxy, this will log some x|y|z lines

    bash5$ wget2 --progress=none --http-proxy=http://localhost:3142 http://deb.debian.org/debian/dists/stable/main/installer-amd64/current/images/hd-media/boot.img.gz
    [0] Downloading 'http://deb.debian.org/debian/dists/stable/main/installer-amd64/current/images/hd-media/boot.img.gz' ...
    Saving 'boot.img.gz'
    HTTP response 200 OK [http://deb.debian.org/debian/dists/stable/main/installer-amd64/current/images/hd-media/boot.img.gz]

    bash5$ http_proxy=http://localhost:3142 wget2 --progress=none http://deb.debian.org/debian/dists/stable/main/installer-amd64/current/images/hd-media/boot.img.gz
    [0] Downloading 'http://deb.debian.org/debian/dists/stable/main/installer-amd64/current/images/hd-media/boot.img.gz' ...
    Saving 'boot.img.gz.1'
    HTTP response 200 OK [http://deb.debian.org/debian/dists/stable/main/installer-amd64/current/images/hd-media/boot.img.gz]
    1756802999|I|977|::1|debrep/dists/stable/main/installer-amd64/current/images/hd-media/boot.img.gz
    1756802999|O|107546248|::1|debrep/dists/stable/main/installer-amd64/current/images/hd-media/boot.img.gz