Anonymous Monk has asked for the wisdom of the Perl Monks concerning the following question:

Is there a way to prevent 450 Method Not Allowed errors? My first assumption was to change POST to GET while getting the document but it didn't change the outcome.

Is the server looking for something that I'm not giving it or is this pretty much saying "If you're a robot, you're gonna die because we won't let you run here!!"?

Replies are listed 'Best First'.
Re: LWP + 450 error
by tachyon (Chancellor) on Mar 06, 2004 at 03:25 UTC

    First it is a 405. Next given the detail you have posted how the hell should we know? Can you get the same page with a browser? Can you get any pages with your LWP implementation? If you can do both, and you have tried using GET and POST try adding:

    my $ua = new LWP::UserAgent; $ua->agent("User-Agent: Mozilla/4.0 (compatible; MSIE 5.5; Windows 98; + )"); # Lie :-)

    If it still fails try adding cookie support (see the docs). Use Data::Dumper to have a look at what is happening inside LWP by dumping the response object. You may see the cookie being set that you are not sending back or javascript widgets or....

    cheers

    tachyon