]> sjero.net Git - wget/blobdiff - src/recur.c
Automated merge.
[wget] / src / recur.c
index aa83e9a6c15651a03a0961d7b8a7be9f6e33d688..119896ce4431bbf1088951a57b8731e123b46f6c 100644 (file)
@@ -51,7 +51,6 @@ as that of the covered work.  */
 #include "html-url.h"
 #include "css-url.h"
 #include "spider.h"
-#include "iri.h"
 \f
 /* Functions for maintaining the URL queue.  */
 
@@ -117,7 +116,7 @@ url_enqueue (struct url_queue *queue, struct iri *i,
 
   if (i)
     DEBUGP (("[IRI Enqueuing %s with %s\n", quote (url),
-               quote (i->uri_encoding)));
+             i->uri_encoding ? quote (i->uri_encoding) : "None"));
 
   if (queue->tail)
     queue->tail->next = qel;
@@ -202,13 +201,14 @@ retrieve_tree (const char *start_url)
   int up_error_code;
   struct url *start_url_parsed;
   struct iri *i = iri_new ();
-  set_uri_encoding (i, opt.locale);
+  set_uri_encoding (i, opt.locale, true);
 
   start_url_parsed = url_parse (start_url, &up_error_code, i);
   if (!start_url_parsed)
     {
-      logprintf (LOG_NOTQUIET, "%s: %s.\n", start_url,
-                 url_error (up_error_code));
+      char *error = url_error (start_url, up_error_code);
+      logprintf (LOG_NOTQUIET, "%s: %s.\n", start_url, error);
+      xfree (error);
       return URLERROR;
     }
 
@@ -391,7 +391,7 @@ retrieve_tree (const char *start_url)
                                         blacklist, i))
                     {
                       ci = iri_new ();
-                      set_uri_encoding (ci, i->content_encoding);
+                      set_uri_encoding (ci, i->content_encoding, false);
                       url_enqueue (queue, ci, xstrdup (child->url->url),
                                    xstrdup (referer_url), depth + 1,
                                    child->link_expect_html,