Hi there,

this is an Post of November 2004 and yesterday I stumbled myself over a situation where I don't want to get redirected. I tried to script-get worksheets with incremental-numbering. Easy you would say: 404 or success so check $?. The server does however try to be nice to me and always redirect me to the previously released worksheet and wget downloads it just again...

So i tried combinations of -l1 and -R but they just are not taken into account.

For that reason I want to get this topic back to mind. A simple --follow-redirects switch would be nice or a --treat-http-status-302-as-error or something like it.

Thanks

Matthias

Peter Valdemar Mørch schrieb:
Hi there,

Having searched the mailing list archives, I've found several requests to be able to disable the following of redirects, but no solution.

In http://www.mail-archive.com/[EMAIL PROTECTED]/msg05320.html, Hrvoje Niksic writes:
There is currently no way to disable following redirects.  A patch to
do so has been submitted recently, but I didn't see a good reason why
one would need it, so I didn't add the option.  Your mail is a good
argument, but I don't know how prevalent that behavior is.

Yes, unfortunately a lot of the servers that I'm downloading from do use e.g. 302 redirects to a page that essentially says "404". AAArrrrhhh...

So right now, I use -o output.log along with
grep '\[following\]' output.log; if [ $? ] ...
to determine if such a redirect has taken place. But it would be much nicer with just a plain --ignore-redirects or somthing, which would also save the extra retrieval.

You said (on 17 Sep 2002) that a patch had been submitted... I didn't find an archive for the wget-patches mailing list, but if it really isn't possible as-is (1.9.1), I would sure love such a patch...

Peter

Reply via email to