bugGNU Wget - Bugs: bug #21197, give error message with -nv and...

 
 

bug #21197: give error message with -nv and unknown hostname

Submitted by:  Micah Cowan <micahcowan>
Submitted on:  Sun 30 Sep 2007 05:38:47 PM UTC  
 
Category: User InterfaceSeverity: 2 - Minor
Priority: 7 - HighStatus: Fixed In Repository
Privacy: PublicAssigned to: None
Originator Name: Open/Closed: Closed
Release: NoneOperating System: None
Reproducibility: NoneFixed Release: 1.11
Planned Release: 1.11Regression: None
Work Required: NonePatch Included: Yes

Add a New Comment(Rich Markup)
   

You are not logged in

Please log in, so followups can be emailed to you.

 

Wed 03 Oct 2007 06:22:20 AM UTC, comment #2:

Fixed in 766d7463bcd8.

Micah Cowan <micahcowan>
Sun 30 Sep 2007 10:05:31 PM UTC, comment #1:

My response to Hrvoje's comment to the patch on the ML:

Hrvoje Niksic wrote:

> > Stephen Gildea <stepheng+wget@gildea.com> writes:
> >
>> >> + logprintf (LOG_NOTQUIET,
>> >> + _("%s: unable to resolve persistent host `%s'\n"),
>> >> + exec_name, host);
> >
> > This message sounds inappropriate, since there is no such thing as a
> > "persistent host" at the user level.


Yeah. Also, perhaps the check and log message should be moved to
gethttp, at the check for host_lookup_failed, which
persistent_available_p sets. In case something else is added at some
point which affects the value of host_lookup_failed.

Micah Cowan <micahcowan>
Sun 30 Sep 2007 05:38:47 PM UTC, original submission:

Stephen Gildea wrote the following to the patches ML:

The --non-verbose option to wget outputs almost exactly the amount of
status I want: a one-line success or failure message. But it does the
wrong thing in one common failure case: if the HTTP server hostname
cannot be resolved, wget fails silently. That's really confusing.

This common case deserves at least some message and ideally its own
error message. The following small patch adds one. This diff is
against the current SVN tree, post 1.10.2.

< Stephen

+verbose+
Index: src/http.c
===================================================================
--- src/http.c (revision 2387)
+++ src/http.c (working copy)
@@ -1197,6 +1197,9 @@ persistent_available_p (const char *host
al = lookup_host (host, 0);
if (!al)
{
+ logprintf (LOG_NOTQUIET,
+ _("%s: unable to resolve persistent host `%s'\n"),
+ exec_name, host);
*host_lookup_failed = true;
return false;
}
Index: src/connect.c
===================================================================
--- src/connect.c (revision 2387)
+++ src/connect.c (working copy)
@@ -362,7 +362,12 @@ connect_to_host (const char *host, int p

retry:
if (!al)
- return E_HOST;
+ {
+ logprintf (LOG_NOTQUIET,
+ _("%s: unable to resolve host address `%s'\n"),
+ exec_name, host);
+ return E_HOST;
+ }

address_list_get_bounds (al, &start, &end);
for (i = start; i < end; i++)
-verbose-

Micah Cowan <micahcowan>

 

(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

Attach File(s):
   
   
Comment:
   

No files currently attached

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -unavailable- added by micahcowan (Submitted the item)
  •  

    Please enter the title of George Orwell's famous dystopian book (it's a date):

     

     

    Follow 5 latest changes.

    Date Changed By Updated Field Previous Value => Replaced By
    Wed 03 Oct 2007 06:22:20 AM UTCmicahcowanStatusConfirmed=>Fixed In Repository
      Open/ClosedOpen=>Closed
      Fixed ReleaseNone=>1.11
    Mon 01 Oct 2007 07:49:19 PM UTCmicahcowanPriority3 - Low=>7 - High
    Sun 30 Sep 2007 10:05:31 PM UTCmicahcowanPriority5 - Normal=>3 - Low

    Back to the top


    Powered by Savane 3.1-cleanup1