T
Tomek
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;
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;