]> sjero.net Git - wget/blobdiff - src/recur.c
[svn] Enqueue start_url in the canonical form.
[wget] / src / recur.c
index 2105407163bc4464da0ee1e7fe7c616486972e9e..fa6327d525226f6c64dda1e13d1ebde2e74e0ebd 100644 (file)
@@ -196,8 +196,10 @@ retrieve_tree (const char *start_url)
      now. */
   struct url *start_url_parsed = url_parse (start_url, NULL);
 
-  url_enqueue (queue, xstrdup (start_url), NULL, 0);
-  string_set_add (blacklist, start_url);
+  /* Enqueue the starting URL.  Use start_url_parsed->url rather than
+     just URL so we enqueue the canonical form of the URL.  */
+  url_enqueue (queue, xstrdup (start_url_parsed->url), NULL, 0);
+  string_set_add (blacklist, start_url_parsed->url);
 
   while (1)
     {