]> sjero.net Git - wget/commitdiff
Improve messages when writing a document to stdout.
authorSteven Schubiger <stsc@member.fsf.org>
Sat, 21 Feb 2009 16:32:12 +0000 (17:32 +0100)
committerSteven Schubiger <stsc@member.fsf.org>
Sat, 21 Feb 2009 16:32:12 +0000 (17:32 +0100)
src/ChangeLog
src/http.c

index 83fa2a26df9f9a3c594d04b5b1e846ce14e96d98..59c609803fd689b3427a18b825b4488d47329a5e 100644 (file)
@@ -1,3 +1,9 @@
+2009-02-21  Steven Schubiger  <stsc@member.fsf.org>
+
+       * http.c (http_loop): When a document is written to 
+       standard output, don't claim it has been saved to a file.
+       Addresses bug #20520.
+
 2009-02-18  Steven Schubiger  <stsc@members.fsf.org>
 
        * recur.h: Remove the dangling declaration for recursive_cleanup().
index 090950d2870c3eb0864d81f3f673ac2909ca6c0b..fa05abd996128807af705e74f271f805e8fe602c 100644 (file)
@@ -2756,9 +2756,14 @@ Remote file exists.\n\n"));
         {
           if (*dt & RETROKF)
             {
+              bool write_to_stdout = (opt.output_document && HYPHENP (opt.output_document));
+
               logprintf (LOG_VERBOSE,
-                         _("%s (%s) - %s saved [%s/%s]\n\n"),
-                         tms, tmrate, quote (hstat.local_file),
+                         write_to_stdout 
+                         ? _("%s (%s) - written to stdout %s[%s/%s]\n\n")
+                         : _("%s (%s) - %s saved [%s/%s]\n\n"),
+                         tms, tmrate,
+                         write_to_stdout ? "" : quote (hstat.local_file),
                          number_to_static_string (hstat.len),
                          number_to_static_string (hstat.contlen));
               logprintf (LOG_NONVERBOSE,
@@ -2787,9 +2792,14 @@ Remote file exists.\n\n"));
             {
               if (*dt & RETROKF)
                 {
+                  bool write_to_stdout = (opt.output_document && HYPHENP (opt.output_document));
+
                   logprintf (LOG_VERBOSE,
-                             _("%s (%s) - %s saved [%s]\n\n"),
-                             tms, tmrate, quote (hstat.local_file),
+                             write_to_stdout
+                             ? _("%s (%s) - written to stdout %s[%s]\n\n")
+                             : _("%s (%s) - %s saved [%s]\n\n"),
+                             tms, tmrate, 
+                             write_to_stdout ? "" : quote (hstat.local_file),
                              number_to_static_string (hstat.len));
                   logprintf (LOG_NONVERBOSE,
                              "%s URL:%s [%s] -> \"%s\" [%d]\n",