]> sjero.net Git - wget/blobdiff - src/init.c
[svn] Merging fix #20499: MAX_REDIRECTIONS should be configurable.
[wget] / src / init.c
index 35f9503acd81b2bed9750459d980af7104b6f52b..7f8115638425e0785205afacd99a36b85aa28edd 100644 (file)
@@ -5,7 +5,7 @@ This file is part of GNU Wget.
 
 GNU Wget is free software; you can redistribute it and/or modify
 it under the terms of the GNU General Public License as published by
-the Free Software Foundation; either version 2 of the License, or
+the Free Software Foundation; either version 3 of the License, or
 (at your option) any later version.
 
 GNU Wget is distributed in the hope that it will be useful,
@@ -14,8 +14,7 @@ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 GNU General Public License for more details.
 
 You should have received a copy of the GNU General Public License
-along with Wget; if not, write to the Free Software Foundation, Inc.,
-51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+along with Wget.  If not, see <http://www.gnu.org/licenses/>.
 
 In addition, as a special exception, the Free Software Foundation
 gives permission to link the code of its release of Wget with the
@@ -183,6 +182,7 @@ static struct {
   { "loadcookies",     &opt.cookies_input,     cmd_file },
   { "logfile",         &opt.lfilename,         cmd_file },
   { "login",           &opt.ftp_user,          cmd_string },/* deprecated*/
+  { "maxredirect",     &opt.max_redirect,      cmd_number },
   { "mirror",          NULL,                   cmd_spec_mirror },
   { "netrc",           &opt.netrc,             cmd_boolean },
   { "noclobber",       &opt.noclobber,         cmd_boolean },
@@ -322,6 +322,7 @@ defaults (void)
   opt.restrict_files_case = restrict_no_case_restriction;
 
   opt.content_disposition = true;
+  opt.max_redirect = 20;
 }
 \f
 /* Return the user's home directory (strdup-ed), or NULL if none is