Migrate LWP::UserAgent + HTTP::Request to mod_perl2
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
Re: Migrate LWP::UserAgent + HTTP::Request to mod_perl2
What's the error msg you see? Nguyen Vu Hung wrote: > 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 >
Cleanuphandler
In my mason template I have the following code. $r->set_handlers( PerlCleanupHandler => [ &do_cleanup ]); But for some reason the main script waits for the function do_cleanup to finish. I thought the function would be process in the Cleanup Phase? The borwser will set their until the function do_cleanup is done processing. Thanks
regarding the debuging CSS file using apache
hi all, We configured apache and mozilla in cygwin environment, we want to know how to debug CSS file using apache and mozilla browser. thankyou. - Looking for a deal? Find great prices on flights and hotels with Yahoo! FareChase.
Re: regarding the debuging CSS file using apache
tara sasanka wrote: > We configured apache and mozilla in cygwin > environment, we want to know how to debug CSS file using apache and mozilla > browser. Sounds like you're a little confused about web technologies. CSS (along with HTML, JavaScript, etc) are client side technologies. This means they have nothing to do with Apache. Apache merely sends them to the client (the web browser). If you want to poke and prod (I'm not quite sure what "debugging CSS" means) what a browser is doing with the CSS file you probably want to use Firefox (with various extensions (firebug, web-dev-toolbar, etc), not the plain Mozilla browser. And Firefox runs in Windows so you're only complicating things by using Cygwin. Btw, none of this has anything to do with mod_perl which is the point of this list. If you have any other questions, please find a more appropriate list. -- Michael Peters Developer Plus Three, LP