LWP::UserAgent hangs up infinitively



Hello!

I use Perl 5.8.8 and newest LWP.

Recently, I encountered some weird behavior using LWP::UserAgent. LWP makes 100% CPU time with this simple script and hangs up. Seems remote server is
sending bad HTTP response, is there a way to solve it ?

adding $ua->max_size(xx) doesn't help.

If you have any idea how to solve that please tell me..


Best regards, Tomasz Kraus

Error can be reproduced with code:

#!/usr/local/bin/perl
use strict;
use LWP::UserAgent;
my $ua=new LWP::UserAgent;
$ua->timeout(30);
$ua->agent("Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; .NET CLR 1.1.4322)");
push @{ $ua->requests_redirectable }, 'POST';
my $resp=$ua->get('http://cod.menofgod.us/user.php?op=register&module=NS-NewUser');
if ($resp->is_success) {
print $resp->content;
}
print $resp->content;
.



Relevant Pages

  • LWP::UserAgent infinite hang
    ... I use Perl 5.8.8 and newest LWP. ... LWP makes 100% CPU time with this ... simple script and hangs up. ...
    (comp.lang.perl.misc)
  • Re: How to transparently download multiple files?
    ... to Perl and/or to HTML to produce reasonable HTML. ... This is a result of the content type you are using in your script. ... even if a download print. ... Research and learn about the LWP module. ...
    (comp.lang.perl.misc)
  • Re: How to transparently download multiple files?
    ... This is a result of the content type you are using in your script. ... three separate files to a single browser instance, even if a download print. ... Research and learn about the LWP module. ...
    (comp.lang.perl.misc)
  • Re: monitoring changing web pages
    ... set the script on a scheduler. ... > LWP. ... have the script email the group of people. ... another pointless reason to use a module. ...
    (comp.lang.perl.misc)
  • Re: How to call another program
    ... > to run a script in a script, I saw no evidence what you posted ... You don't seem to have the remotest clue what kind of impression ... Not on the basis of your own evidence, ... plausible interpretation of what you want, is that the answer is LWP. ...
    (comp.lang.perl.misc)