Sat 23 Jul 2011 10:44:41 AM UTC, original submission:
Hello,
a wishlist request http://bugs.debian.org/612450
--8<--
I do not what benefits this brings but wget apperantly only shows only first
3 addresses of given hostname.
# host http://www.debian.org
http://www.debian.org has address 82.195.75.97
http://www.debian.org has address 86.59.118.148
http://www.debian.org has IPv6 address 2001:41b8:202:deb:216:35ff:fec4:6340
http://www.debian.org has IPv6 address 2001:858:2:2:214:22ff:fe0d:7717
# wget http://www.debian.org/
--2011-02-08 16:06:27-- http://www.debian.org/
Resolving http://www.debian.org... 2001:858:2:2:214:22ff:fe0d:7717,
2001:41b8:202:deb:216:35ff:fec4:6340, 82.195.75.97, ...
Connecting to http://www.debian.org|2001:858:2:2:214:22ff:fe0d:7717|:80... connected.
HTTP request sent, awaiting response... 200 OK
Length: 14273 (14K) [text/html]
Saving to: `index.html.1'
100%[==================================================================================================>]
14,273 34.0K/s in 0.4s
2011-02-08 16:06:27 (34.0 KB/s) - `index.html.1' saved [14273/14273]
#
(but as you can see it actually shows ", ...", indiciateing there are some more
ip addresses).
Becasue if host two IP address, it will pring something like:
....
Resolving he.net... 2001:470:0:76::2, 216.218.186.2
....
With no ", ...".
I do not see why it print only 3. More than 3 are rearly seen.
More often in case of IPv6 there would be 2 or 4 actually.
Also even there is more, then this will be extreamly reare, and why not just be
correct and display all for user information.
This can happen confusing to user if for example reconnection will take place.
Or when wget will be restarted again, now showing something different
....
Resolving http://www.debian.org... 2001:858:2:2:214:22ff:fe0d:7717,
2001:41b8:202:deb:216:35ff:fec4:6340, 86.59.118.148, ...
....
compared to previous
....
Resolving http://www.debian.org... 2001:858:2:2:214:22ff:fe0d:7717,
2001:41b8:202:deb:216:35ff:fec4:6340, 82.195.75.97, ...
....
(this all is correct, but not very clear).
Why bother with limits, and possibility of some bugs in more complex code :)
--8<--
the code limits it and maybe you aggree with him that limiting it to 3 has no advantage:
src/host.c
...
/* Print the addresses determined by DNS lookup, but no more than
three. */
if (!silent && !numeric_address)
{
int i;
int printmax = al->count <= 3 ? al->count : 3;
for (i = 0; i < printmax; i++)
{
logputs (LOG_VERBOSE, print_address (al->addresses + i));
if (i < printmax - 1)
logputs (LOG_VERBOSE, ", ");
}
if (printmax != al->count)
logputs (LOG_VERBOSE, ", ...");
logputs (LOG_VERBOSE, "\n");
}
...
|