]> sjero.net Git - wget/commitdiff
Do not register redirects when in spider mode.
authorGiuseppe Scrivano <gscrivano@gnu.org>
Tue, 26 Jul 2011 10:42:40 +0000 (12:42 +0200)
committerGiuseppe Scrivano <gscrivano@gnu.org>
Tue, 26 Jul 2011 10:42:40 +0000 (12:42 +0200)
src/ChangeLog
src/retr.c

index d394166e9c0fb24bc22c48ae4b39b16f7d491409..0dbabfa2f38d279614d4fe6ed0a4319f57879f15 100644 (file)
@@ -1,3 +1,7 @@
+2011-07-26  Giuseppe Scrivano  <gscrivano@southpole.se>
+
+       * retr.c (retrieve_url): Do not register redirects when in spider mode.
+
 2011-07-20 Merinov Nikolay <kim.roader@gmail.com>
 
        * iri.c (remote_to_utf8): Add test for non-ASCII symbols with
index 2b42454a17c609021bb04eaf2356124b99abf554..54937d862bc3dcb0f0d064ac06dc19b017944198 100644 (file)
@@ -878,7 +878,7 @@ retrieve_url (struct url * orig_parsed, const char *origurl, char **file,
     {
       register_download (u->url, local_file);
 
-      if (redirection_count && 0 != strcmp (origurl, u->url))
+      if (!opt.spider && redirection_count && 0 != strcmp (origurl, u->url))
         register_redirection (origurl, u->url);
 
       if (*dt & TEXTHTML)