]> sjero.net Git - wget/blobdiff - src/ftp.c
[svn] Allow match_tail to be case insensitive.
[wget] / src / ftp.c
index 45685329586a13d7e78c3d27547db9a9ca61db5b..ebddf3a06fbfaaf9d8890fbd459452b2ea209bcc 100644 (file)
--- a/src/ftp.c
+++ b/src/ftp.c
@@ -698,6 +698,18 @@ Error in server response, closing control connection.\n"));
 
   if (cmd & DO_RETR)
     {
+      /* If we're in spider mode, don't really retrieve anything.  The
+        fact that we got to this point should be proof enough that
+        the file exists, vaguely akin to HTTP's concept of a "HEAD"
+        request.  */
+      if (opt.spider)
+       {
+         CLOSE (csock);
+         closeport (dtsock);
+         rbuf_uninitialize (&con->rbuf);
+         return RETRFINISHED;
+       }
+
       if (opt.verbose)
        {
          if (!opt.server_response)