Date: Fri, 17 Jul 2009 15:12:33 -0700 (PDT) From: "Joe R. Jah" <jjah@cloud.ccsf.cc.ca.us> To: freebsd-questions@freebsd.org Subject: OT: wget bug Message-ID: <20090717144049.C35992@cloud.ccsf.cc.ca.us>
next in thread | raw e-mail | index | archive | help
Hello all, I want to wget a site at regular intervals and only get the updated pages, so I use the this wget command line: wget -b -m -nH http://host.domain/Directory/file.html It works fine on the first try, but it fails on subsequent tries with the following error message: --8<-- Connecting to host.domain ... connected. HTTP request sent, awaiting response... 401 Unauthorized Authorization failed. --8<-- I can change directory from which to run wget every time, but that defeats the purpose of downloading only the changed files. I googled "wget fails on second try" and found this small patch in a Linux group that should supposedly fix the problem: --8<-- --- wget-1.10.2/src/ftp.c.cwd 2006-12-03 13:23:08.801467652 +0100 +++ wget-1.10.2/src/ftp.c 2006-12-03 20:30:24.641876672 +0100 @@ -1172,7 +1172,7 @@ len = 0; err = getftp (u, &len, restval, con); - if (con->csock != -1) + if (con->csock == -1) con->st &= ~DONE_CWD; else con->st |= DONE_CWD; --8<-- My wget is the latest version in the ports, 1.11.4. Any ideas or advise is greatly appreciated. Regards, Joe -- _/ _/_/_/ _/ ____________ __o _/ _/ _/ _/ ______________ _-\<,_ _/ _/ _/_/_/ _/ _/ ......(_)/ (_) _/_/ oe _/ _/. _/_/ ah jjah@cloud.ccsf.cc.ca.us
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20090717144049.C35992>