]> sjero.net Git - wget/commitdiff
[svn] Fixed pre-download verbose output which was broken by HTTP code refactoring.
authormtortonesi <devnull@localhost>
Wed, 7 Dec 2005 08:24:24 +0000 (00:24 -0800)
committermtortonesi <devnull@localhost>
Wed, 7 Dec 2005 08:24:24 +0000 (00:24 -0800)
src/ChangeLog
src/http.c

index 1ea65a30ab80e2400cdafd9aedf2433cd98d3171..5c3556b9e3ce346743bd94fa0ddc8ba72370a43e 100644 (file)
@@ -1,3 +1,8 @@
+2005-12-07  Mauro Tortonesi  <mauro@ferrara.linux.it>
+
+       * http.c: Fixed pre-download verbose output which was broken by 
+       HTTP code refactoring.
+
 2005-11-23  Mauro Tortonesi  <mauro@ferrara.linux.it>
 
        * http.c: Refactored HTTP code.  If -O is not used, the new code
index 971c9f16be84f5c02c56fd321bfbbdcc7862cd4b..a882c2d1acd7a8dd1630e8a721c00a486efe66a9 100644 (file)
@@ -2157,12 +2157,30 @@ http_loop (struct url *u, char **newloc, char **local_file, const char *referer,
       if (opt.verbose)
         {
           char *hurl = url_string (u, true);
-          char tmp[256];
-          strcpy (tmp, "        ");
-          if (count > 1)
-            sprintf (tmp, _("(try:%2d)"), count);
-          logprintf (LOG_VERBOSE, "--%s--  %s\n  %s\n",
-                     tms, hurl, tmp);
+          logprintf (LOG_VERBOSE, "--%s--  %s\n",
+                     tms, hurl);
+          
+          if (count > 1) 
+            {
+              char tmp[256];
+              sprintf (tmp, _("(try:%2d)"), count);
+              logprintf (LOG_VERBOSE, "  %s", tmp);
+            }
+          else 
+            {
+              logprintf (LOG_VERBOSE, "        ");
+            }
+          
+          if (hstat.local_file) 
+            {
+              logprintf (LOG_VERBOSE, " => `%s'\n", 
+                         HYPHENP (hstat.local_file) ? "STDOUT" : hstat.local_file);
+            }
+          else
+            {
+              logprintf (LOG_VERBOSE, "\n");
+            }
+          
 #ifdef WINDOWS
           ws_changetitle (hurl);
 #endif