URL:
  <http://savannah.gnu.org/bugs/?33835>

                 Summary: don't limit DNS results to 3 (src/host.c)
                 Project: GNU Wget
            Submitted by: nok
            Submitted on: Sa 23 Jul 2011 12:44:41 CEST
                Category: Feature Request
                Severity: 3 - Normal
                Priority: 5 - Normal
                  Status: None
                 Privacy: Public
             Assigned to: None
         Originator Name: 
        Originator Email: 
             Open/Closed: Open
         Discussion Lock: Any
                 Release: 1.12
        Operating System: GNU/Linux
         Reproducibility: None
           Fixed Release: None
         Planned Release: None
              Regression: None
           Work Required: None
          Patch Included: None

    _______________________________________________________

Details:

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 www.debian.org
www.debian.org has address 82.195.75.97
www.debian.org has address 86.59.118.148
www.debian.org has IPv6 address 2001:41b8:202:deb:216:35ff:fec4:6340
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 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 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 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 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");
    }
...




    _______________________________________________________

Reply to this item at:

  <http://savannah.gnu.org/bugs/?33835>

_______________________________________________
  Nachricht geschickt von/durch Savannah
  http://savannah.gnu.org/




-- 
To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org

Reply via email to