Is there any reason for LWP to follow links for 301 and 302 codes, not for 303 or 307 ?
See UserAgnent.pm (version 2.003 of LWP 5.69) in sub request, line 461-462):
if ($code == &HTTP::Status::RC_MOVED_PERMANENTLY or $code == &HTTP::Status::RC_MOVED_TEMPORARILY) {
I understand a 303 as a 302 with forcing the GET method, but dont see what's really specific in 307. Perhaps I'm wrong?
Just adding a "if .. RC_SEE_OTHER" to the above test is tempting, but is this correct ? I'm not sure.
I'd like to make a simple $ua->request to kvasir.sol.dk wich transparently lead to www.eniro.dk (via one 301 and one 303, see below).
What's the best way to do it without loosing generality ?
kvasir.sol.dk gives HTTP/1.1 301 Moved Permanently with Location: http://soeg.sol.dk soeg.sol.dk gives HTTP/1.1 303 See Other with Location: htttp://www.eniro.dk
Christophe