]> sjero.net Git - wget/blobdiff - src/http.c
[svn] Fixed pre-download verbose output which was broken by HTTP code refactoring.
[wget] / src / http.c
index c69739cbd3a399c9190af6ab2fdb3355987de390..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
@@ -2222,7 +2240,7 @@ http_loop (struct url *u, char **newloc, char **local_file, const char *referer,
           /* Non-fatal errors continue executing the loop, which will
              bring them to "while" statement at the end, to judge
              whether the number of tries was exceeded.  */
-          //free_hstat (&hstat);
+          /* free_hstat (&hstat); */
           printwhat (count, opt.ntry);
           continue;
         case HOSTERR: case CONIMPOSSIBLE: case PROXERR: case AUTHFAILED: 
@@ -2336,7 +2354,7 @@ The sizes do not match (local %s) -- retrieving.\n"),
                          _("Remote file is newer, retrieving.\n"));
             }
           
-          //free_hstat (&hstat);
+          /* free_hstat (&hstat); */
           hstat.timestamp_checked = true;
           continue;
         }
@@ -2434,7 +2452,7 @@ The sizes do not match (local %s) -- retrieving.\n"),
                          _("%s (%s) - Connection closed at byte %s. "),
                          tms, tmrate, number_to_static_string (hstat.len));
               printwhat (count, opt.ntry);
-              //free_hstat (&hstat);
+              /* free_hstat (&hstat); */
               continue;
             }
           else
@@ -2451,7 +2469,7 @@ The sizes do not match (local %s) -- retrieving.\n"),
                          tms, tmrate, number_to_static_string (hstat.len),
                          hstat.rderrmsg);
               printwhat (count, opt.ntry);
-              //free_hstat (&hstat);
+              /* free_hstat (&hstat); */
               continue;
             }
           else /* hstat.res == -1 and contlen is given */
@@ -2463,7 +2481,7 @@ The sizes do not match (local %s) -- retrieving.\n"),
                          number_to_static_string (hstat.contlen),
                          hstat.rderrmsg);
               printwhat (count, opt.ntry);
-              //free_hstat (&hstat);
+              /* free_hstat (&hstat); */
               continue;
             }
         }