]> sjero.net Git - wget/commitdiff
[svn] Print the actual error message when parsing of redirection URL fails.
authorhniksic <devnull@localhost>
Sat, 24 Nov 2001 14:02:10 +0000 (06:02 -0800)
committerhniksic <devnull@localhost>
Sat, 24 Nov 2001 14:02:10 +0000 (06:02 -0800)
src/ChangeLog
src/retr.c

index 4fd1e2711922bbd827631460e9f06f514cffc21e..04ef9908865815d01d0aa28eb574b070f7132013 100644 (file)
@@ -1,3 +1,8 @@
+2001-11-24  Hrvoje Niksic  <hniksic@arsdigita.com>
+
+       * retr.c (retrieve_url): When the redirection URL doesn't parse,
+       print the correct error message rather than "UNKNOWN".
+
 2001-11-24  Hrvoje Niksic  <hniksic@arsdigita.com>
 
        * progress.c (bar_finish): If the timer didn't record any time
index 9b8ddc214ad74f429ccd45cca6fdbfe1478bf38d..32c58a7fb6bdf5e32263bc49176400d7a78cfbc9 100644 (file)
@@ -326,10 +326,11 @@ retrieve_url (const char *origurl, char **file, char **newloc,
       mynewloc = construced_newloc;
 
       /* Now, see if this new location makes sense. */
-      newloc_struct = url_parse (mynewloc, NULL);
+      newloc_struct = url_parse (mynewloc, &up_error_code);
       if (!newloc_struct)
        {
-         logprintf (LOG_NOTQUIET, "%s: %s.\n", mynewloc, "UNKNOWN");
+         logprintf (LOG_NOTQUIET, "%s: %s.\n", mynewloc,
+                    url_error (up_error_code));
          url_free (newloc_struct);
          url_free (u);
          if (redirections)