]> sjero.net Git - wget/blobdiff - src/retr.c
[svn] * *.{gmo,po,pot}: Regenerated after modifying wget --help output.
[wget] / src / retr.c
index 592500547255f3c9f5afdfb4a0d70790618e8958..62b98a34c89306420689cd9bb3a77784441e9c9c 100644 (file)
@@ -323,7 +323,12 @@ retrieve_url (const char *origurl, char **file, char **newloc,
   if (refurl)
     u->referer = xstrdup (refurl);
   else
-    u->referer = NULL;
+    {
+      if (opt.referer)
+       u->referer = xstrdup (opt.referer);
+      else
+       u->referer = NULL;
+    }
 
   local_use_proxy = USE_PROXY_P (u);
   if (local_use_proxy)
@@ -350,7 +355,7 @@ retrieve_url (const char *origurl, char **file, char **newloc,
       if (result != URLOK || u->proto != URLHTTP)
        {
          if (u->proto == URLHTTP)
-           logprintf (LOG_NOTQUIET, "Proxy %s: %s.\n", proxy, uerrmsg (result));
+           logprintf (LOG_NOTQUIET, "Proxy %s: %s.\n", proxy, uerrmsg(result));
          else
            logprintf (LOG_NOTQUIET, _("Proxy %s: Must be HTTP.\n"), proxy);
          freeurl (u, 1);
@@ -425,9 +430,9 @@ retrieve_url (const char *origurl, char **file, char **newloc,
   return result;
 }
 
-/* Find the URL-s in the file and call retrieve_url() for each of
+/* Find the URLs in the file and call retrieve_url() for each of
    them.  If HTML is non-zero, treat the file as HTML, and construct
-   the URL-s accordingly.
+   the URLs accordingly.
 
    If opt.recursive is set, call recursive_retrieve() for each file.  */
 uerr_t
@@ -438,7 +443,7 @@ retrieve_from_file (const char *file, int html, int *count)
 
   /* If spider-mode is on, we do not want get_urls_html barfing
      errors on baseless links.  */
-  url_list = (html ? get_urls_html (file, NULL, opt.spider)
+  url_list = (html ? get_urls_html (file, NULL, opt.spider, FALSE)
              : get_urls_file (file));
   status = RETROK;             /* Suppose everything is OK.  */
   *count = 0;                  /* Reset the URL count.  */
@@ -455,7 +460,8 @@ retrieve_from_file (const char *file, int html, int *count)
        }
       status = retrieve_url (cur_url->url, &filename, &new_file, NULL, &dt);
       if (opt.recursive && status == RETROK && (dt & TEXTHTML))
-       status = recursive_retrieve (filename, new_file ? new_file : cur_url->url);
+       status = recursive_retrieve (filename, new_file ? new_file
+                                                       : cur_url->url);
 
       if (filename && opt.delete_after && file_exists_p (filename))
        {