]> sjero.net Git - wget/blobdiff - src/ftp.c
[svn] A bunch of new features:
[wget] / src / ftp.c
index d2399311e6a56a2f0863b40668aa7b4109ad8bda..aa283cf8fbbc554799f39185b164a54c38b6d327 100644 (file)
--- a/src/ftp.c
+++ b/src/ftp.c
@@ -1,5 +1,5 @@
 /* File Transfer Protocol support.
-   Copyright (C) 1995, 1996, 1997, 1998 Free Software Foundation, Inc.
+   Copyright (C) 1995, 1996, 1997, 1998, 2000 Free Software Foundation, Inc.
 
 This file is part of Wget.
 
@@ -40,7 +40,6 @@ Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.  */
 #include "rbuf.h"
 #include "retr.h"
 #include "ftp.h"
-#include "html.h"
 #include "connect.h"
 #include "host.h"
 #include "fnmatch.h"
@@ -722,7 +721,7 @@ Error in server response, closing control connection.\n"));
     }
   reset_timer ();
   /* Get the contents of the document.  */
-  res = get_contents (dtsock, fp, len, restval, expected_bytes, &con->rbuf);
+  res = get_contents (dtsock, fp, len, restval, expected_bytes, &con->rbuf, 0);
   con->dltime = elapsed_time ();
   tms = time_str (NULL);
   tmrate = rate (*len - restval, con->dltime);
@@ -996,8 +995,16 @@ ftp_loop_internal (struct urlinfo *u, struct fileinfo *f, ccon *con)
        }
       logprintf (LOG_VERBOSE, _("%s (%s) - `%s' saved [%ld]\n\n"),
                 tms, tmrate, locf, len);
-      logprintf (LOG_NONVERBOSE, "%s URL: %s [%ld] -> \"%s\" [%d]\n",
-                tms, u->url, len, locf, count);
+      if (!opt.verbose && !opt.quiet)
+       {
+         /* Need to hide the password from the URL.  The `if' is here
+             so that we don't do the needless allocation every
+             time. */
+         char *hurl = str_url (u->proxy ? u->proxy : u, 1);
+         logprintf (LOG_NONVERBOSE, "%s URL: %s [%ld] -> \"%s\" [%d]\n",
+                    tms, hurl, len, locf, count);
+         free (hurl);
+       }
 
       if ((con->cmd & DO_LIST))
        /* This is a directory listing file. */