On Thu, 15 Apr 2004, Alexander V. Lukyanov wrote:
> On Thu, Apr 15, 2004 at 05:20:26PM +0200, Dag Wieers wrote:
> > I was wondering if it was possible to let lftp understand about HTTP
> > redirects (301 and 302). I have a lot of people vising my website using
> > lftp and I'd like to be able to redirect those to another mirror (without
> > the fancy graphical stuff ;))
>
> lftp already understands these redirects. Maybe not in all cases, but
> commands get, mirror and cd do handle it.
Ok, try out:
lftp http://dag.wieers.com/packages/
If your HTTP_USER_AGENT contains wget or lftp, you are redirected to
http://apt.sw.be/packages/. If I test it here with lftp 3.0.1, I get this:
[EMAIL PROTECTED] dag]$ lftp http://dag.wieers.com/packages/
lftp dag.wieers.com:/packages> ls
drwxr-xr-x -- .
However this works:
[EMAIL PROTECTED] dag]$ lftp http://apt.sw.be/packages/
lftp apt.sw.be:/packages> ls
drwxr-xr-x -- /
drwxr-xr-x - 2004-04-15 02:21 4g8
drwxr-xr-x - 2004-02-25 09:33 BasiliskII
I would have expected my initial ls to automatically reconnect to
apt.sw.be instead of dag.wieers.com. So that the ls was done on apt.sw.be.
If that would be possible in the future, it would be great ;)
-- dag wieers, [EMAIL PROTECTED], http://dag.wieers.com/ --
[Any errors in spelling, tact or fact are transmission errors]