net: wget: Support non-default HTTP port
authorMarek Vasut <marex@denx.de>
Wed, 13 Dec 2023 21:11:13 +0000 (22:11 +0100)
committerTom Rini <trini@konsulko.com>
Tue, 19 Dec 2023 13:01:59 +0000 (08:01 -0500)
commit4caacb2f29f03e7ad724233282384be10c68e926
tree03f56053d85e620d9708b309da33e3a8baa9c79d
parentfac5308d275720b67b442383572a84edb212d6a1
net: wget: Support non-default HTTP port

Currently the wget command is hard wired to HTTP port 80. This is
inconvenient, as it is extremely easy to start trivial HTTP server
as an unprivileged user using e.g. python http module to serve the
files, but such a server has to run on one of the higher ports:
"
$ python3 -m http.server -d $(pwd) 8080
"

Make it possible to configure HTTP server port the same way it is
possible to configure TFTP server port, using environment variable
'httpdstp' (similar to 'tftpdstp'). Retain port 80 as the default
fallback port. This way, users can start their own trivial server
and conveniently download whatever files they need into U-Boot.

Signed-off-by: Marek Vasut <marex@denx.de>
Reviewed-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Ramon Fried <rfried.dev@gmail.com>
doc/usage/cmd/wget.rst
doc/usage/environment.rst
include/net/wget.h
net/wget.c