Well I have pinpointed the problem. It's a problem with LWP::UserAgent and LWP::Simple.
Here is a some sample code. It acts as a post proxy. Every time this is ran I get 50 or so error messages as above.
use LWP::UserAgent;
my $ua = LWP::UserAgent->new;
$ua->agent("send");
# Create a request
my $req = HTTP::Request->new(POST => 'http://signup.website.com/in
+dex.pl?action=signup');
$req->content_type('application/x-www-form-urlencoded');
use URI::Escape;
my $username = uri_escape($CGI->param('username'));
my $email = uri_escape($CGI->param('email'));
my $password = uri_escape($CGI->param('password'));
my $name = uri_escape($CGI->param('name'));
my $recaptcha_response_field = uri_escape($CGI->param('recaptcha_r
+esponse_field'));
my $recaptcha_challenge_field = uri_escape($CGI->param('recaptcha_
+challenge_field'));
my $affiliate_key = uri_escape($CGI->param('affiliate_key'));
$req->content("username=$username&email=$email&password=$passwor
+d&name=$name&recaptcha_response_field=$recaptcha_response_field&recap
+tcha_challenge_field=$recaptcha_challenge_field&affiliate_key=$affili
+ate_key&sitetype=clan");
# Pass request to the user agent and get a response back
my $res = $ua->request($req);
# Check the outcome of the response
print $CGI->header(-type => "text/html");
if ($res->is_success) {
print $res->content;
}else {
print $res->status_line, "\n";
}
-
Are you posting in the right place? Check out Where do I post X? to know for sure.
-
Posts may use any of the Perl Monks Approved HTML tags. Currently these include the following:
<code> <a> <b> <big>
<blockquote> <br /> <dd>
<dl> <dt> <em> <font>
<h1> <h2> <h3> <h4>
<h5> <h6> <hr /> <i>
<li> <nbsp> <ol> <p>
<small> <strike> <strong>
<sub> <sup> <table>
<td> <th> <tr> <tt>
<u> <ul>
-
Snippets of code should be wrapped in
<code> tags not
<pre> tags. In fact, <pre>
tags should generally be avoided. If they must
be used, extreme care should be
taken to ensure that their contents do not
have long lines (<70 chars), in order to prevent
horizontal scrolling (and possible janitor
intervention).
-
Want more info? How to link
or How to display code and escape characters
are good places to start.
|