]> sjero.net Git - wget/blobdiff - src/main.c
Automated merge.
[wget] / src / main.c
index 8cee194c8f794135e7bbb73e5e35da2baad1bf44..7c7be1c740484192bac7235d113ed5c2f06d1c6d 100644 (file)
@@ -43,9 +43,6 @@ as that of the covered work.  */
 #include <assert.h>
 #include <errno.h>
 #include <time.h>
-#ifdef ENABLE_IRI
-#include <langinfo.h>
-#endif
 
 #include "utils.h"
 #include "init.h"
@@ -166,6 +163,7 @@ static struct cmdline_option option_data[] =
     { "cookies", 0, OPT_BOOLEAN, "cookies", -1 },
     { "cut-dirs", 0, OPT_VALUE, "cutdirs", -1 },
     { WHEN_DEBUG ("debug"), 'd', OPT_BOOLEAN, "debug", -1 },
+    { "default-page", 0, OPT_VALUE, "defaultpage", -1 },
     { "delete-after", 0, OPT_BOOLEAN, "deleteafter", -1 },
     { "directories", 0, OPT_BOOLEAN, "dirstruct", -1 },
     { "directory-prefix", 'P', OPT_VALUE, "dirprefix", -1 },
@@ -519,6 +517,9 @@ HTTP options:\n"),
        --http-password=PASS    set http password to PASS.\n"),
     N_("\
        --no-cache              disallow server-cached data.\n"),
+    N_ ("\
+       --default-page=NAME     Change the default page name (normally\n\
+                               this is `index.html'.).\n"),
     N_("\
   -E,  --html-extension        save HTML documents with `.html' extension.\n"),
     N_("\
@@ -1199,14 +1200,14 @@ WARNING: Can't reopen standard output in binary mode;\n\
           if (url_scheme (*t) == SCHEME_FTP)
             opt.follow_ftp = 1;
 
-          status = retrieve_tree (*t);
+          status = retrieve_tree (*t, NULL);
 
           opt.follow_ftp = old_follow_ftp;
         }
       else
         {
           struct iri *i = iri_new ();
-          set_uri_encoding (i, opt.locale);
+          set_uri_encoding (i, opt.locale, true);
           status = retrieve_url (*t, &filename, &redirected_URL, NULL, &dt,
                                  opt.recursive, i);
           iri_free (i);