]> sjero.net Git - wget/blobdiff - src/res.c
[svn] Several fixes for recursive spider mode.
[wget] / src / res.c
index 103bc4e7c8aedcbca3037d7cbce95ded305f2f84..a160591fe27552b621aed8961b49a7f2b42cbb55 100644 (file)
--- a/src/res.c
+++ b/src/res.c
@@ -1,5 +1,5 @@
 /* Support for Robot Exclusion Standard (RES).
-   Copyright (C) 2001 Free Software Foundation, Inc.
+   Copyright (C) 2001,2006 Free Software Foundation, Inc.
 
 This file is part of Wget.
 
@@ -539,10 +539,16 @@ res_retrieve_file (const char *url, char **file)
 {
   uerr_t err;
   char *robots_url = uri_merge (url, RES_SPECS_LOCATION);
+  int saved_ts_val = opt.timestamping;
+  int saved_sp_val = opt.spider;
 
   logputs (LOG_VERBOSE, _("Loading robots.txt; please ignore errors.\n"));
   *file = NULL;
+  opt.timestamping = false;
+  opt.spider       = false;
   err = retrieve_url (robots_url, file, NULL, NULL, NULL, false);
+  opt.timestamping = saved_ts_val;
+  opt.spider       = saved_sp_val;  
   xfree (robots_url);
 
   if (err != RETROK && *file != NULL)