The thing is, I can do the redirection manually. I can find the url redirection link in the retrieved web page, and use it to retrieve the web page I want. This works, but it is very long and ugly, and I would rather use the LWP::UserAgent redirection if I can.
Also, the page that I get back with the redirection loop is a page that can be redirected (it has the redirection url link), so I don't think that something is wrong with the website. | [reply] |
Do you have a page example?
According to the docks the redirect limit in LWP::UserAgent is set to 7 unless you change it with the 'max_redirect' option. I can't think of a reason why you would need to set it beyond 7. If you've some how set it to 0 then that would explain a few things.
| [reply] |
Thanks for your reply.
I don't think the redirect option is set to 0, because in most cases (80%) the LWP::UserAgent redirection works fine.
This is what I get when I print the retrieved page header:
Date: Mon, 15 May 2006 14:08:20 GMT
Location: /libweb/australia/do/login
Server: Apache Tomcat/4.1.12 (HTTP/1.1 Connector)
Content-Length: 65
Content-Type: text/html; charset=UTF-8
Client-Date: Mon, 15 May 2006 14:05:43 GMT
Client-Response-Num: 1
Client-Warning: Redirect loop detected
The page itself is an error message.
I don't think that there are more than 7 redirections, because when I can redirect it manually without too much trouble (although I don't want to use this solution). If you have any other ideas I would be happy to hear them.
Thanks,
Guy Naamati
| [reply] |
Well, thanks for the help.
If I ever figure it out I will let you know, although the javascript answer seems quite possible (javascript has been giving me trouble before).
Thanks again
Guy Naamati
| [reply] |