X-Git-Url: http://sjero.net/git/?p=wget;a=blobdiff_plain;f=src%2Fretr.c;h=92494fc9722599247966a89faec902ea7cc0e441;hp=c531be59c35bae44344c14e9b661a8c9af05b558;hb=10da871ac441fe99f5d20dd8f1e9ec3797c0a5a2;hpb=01346093a8c1f532a3fb8019f678c4926903a1c3 diff --git a/src/retr.c b/src/retr.c index c531be59..92494fc9 100644 --- a/src/retr.c +++ b/src/retr.c @@ -567,12 +567,6 @@ calc_rate (wgint bytes, double secs, int *units) return dlrate; } -/* Maximum number of allowed redirections. 20 was chosen as a - "reasonable" value, which is low enough to not cause havoc, yet - high enough to guarantee that normal retrievals will not be hurt by - the check. */ - -#define MAX_REDIRECTIONS 20 #define SUSPEND_POST_DATA do { \ post_data_suspended = true; \ @@ -746,10 +740,10 @@ retrieve_url (const char *origurl, char **file, char **newloc, mynewloc = xstrdup (newloc_parsed->url); /* Check for max. number of redirections. */ - if (++redirection_count > MAX_REDIRECTIONS) + if (++redirection_count > opt.max_redirect) { logprintf (LOG_NOTQUIET, _("%d redirections exceeded.\n"), - MAX_REDIRECTIONS); + opt.max_redirect); url_free (newloc_parsed); url_free (u); xfree (url);