> -----Original Message----- > From: John J Lee [mailto:[EMAIL PROTECTED] > Sent: Tuesday, May 27, 2003 6:27 AM > To: [EMAIL PROTECTED] > Subject: Re: 301 errors > > > On Mon, 26 May 2003, Daniel Harrison wrote: > [...] > > script). Sniffing the connections shows that the server is > sending back: > > > > HTTP/1.1 301 Error.. > > > > But $response->code is being set to 200. Is there something > that I am > > missing in the way that it should detect the 301's? > > Seems safe to say that a 301 response should result in a 301 > $response->code. Have you checked LWP isn't choking on the > extra dots at > the end there? >
Technically, 301 isn't an error, it's a "response code". 301 means "Permanently moved", and a new URL is supposed to be supplied. Perhaps you have your UserAgent configured to automatically follow redirects and it's getting a 200 response code after the redirect is followed? There's a way of turning this off, indicated in the LWP::UserAgent docs, if I recall. jpt
