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

Hello, I recently started getting the following error while i try to GET a page using WWW::Mechanize:
Requested Range Not Satisfiable

Any ideas on what might be causing this and how to solve this problem ? Thanks
  • Comment on WWW::Mechanize: 416-Requested Range Not Satisfiable

Replies are listed 'Best First'.
Re: WWW::Mechanize: 416-Requested Range Not Satisfiable
by james2vegas (Chaplain) on Jun 10, 2010 at 22:55 UTC
    Unless you're trying to resume a file transfer or explicitly requesting a Range, sounds like an error on the server.
      Hello james2vegas, thanks for replying, I am just getting a login page ".../login.php".
      and I did not explicitly request a range.

      Do you have any suggestions on how to slove this ?
        There is nothing for you to solve, the server is broken.
Re: WWW::Mechanize: 416-Requested Range Not Satisfiable
by Your Mother (Archbishop) on Jun 14, 2010 at 18:22 UTC

    ikegami has it. They're blocking agents and returning an incorrect error. Specifying the agent name makes the error go away-

    cow@moo[99]>perl -MWWW::Mechanize my $mech = WWW::Mechanize->new(); $mech->get('http://www.warez-bb.org/login.php'); Error GETing http://www.warez-bb.org/login.php: Requested Range Not Sa +tisfiable at - line 2 cow@moo[100]>perl -MWWW::Mechanize my $mech = WWW::Mechanize->new(agent => "GEADtruancyBot/3.14"); $mech->get('http://www.warez-bb.org/login.php');

    Side-note: friends don't let friends use warez. (update: typo/rephrase.)