Hi all,

The following code run without problems under Apache 1.3.29, Perl 5.6.1,
mod_perl 1.29.

Under the new environment which is Apache 2.0.52, Perl 5.8.8, mod_perl
2.0.3 ( Cent OS 4.5 ), it won't run.

I have read through mod_perl2's compat page[1] and rename[2] page, but I
didn't find any useful information on how to get this code running under
the new environment.

Please shed me a light!

use LWP::UserAgent;
use HTTP::Request;

my $user_agent = LWP::UserAgent->new;
my $ua_request HTTP::Request->request->new($some_request});
$ua_request->content_type('application/x-www-form-urlencoded');
$ua_request->content($param);
my $rreq = $ua_request->content_ref;
$$rreq =~ s/%2F/\//g;
$req->header('Content-Length' => length($ua_request->content));
my $respond = $user_agent->request($ua_request);

unless ($respond->is_success) {
# $respond failed HERE! why?
}

[1] http://perl.apache.org/docs/2.0/user/porting/compat.html
[2] http://perl.apache.org/docs/2.0/rename.html

Reply via email to