You are viewing a plain text version of this content. The canonical link for it is here.
Posted to modperl@perl.apache.org by Boysenberry Payne <bo...@humaniteque.com> on 2005/09/22 01:46:51 UTC

MP2 version of Apache->request

I used to have:

my $r = Apache->request();
$r->content_type("text/html");
$r->send_http_header;

It seems the MP2 syntax is now:

$r = Apache2::RequestRec->new($c);
$r->content_type("text/html");

How do I get $c?
How do I send the http header now?

Thanks,
Boysenberry

boysenberrys.com | habitatlife.com | selfgnosis.com

Re: MP2 version of Apache->request

Posted by Geoffrey Young <ge...@modperlcookbook.org>.

Boysenberry Payne wrote:
> I used to have:
> 
> my $r = Apache->request();
> $r->content_type("text/html");
> $r->send_http_header;
> 
> It seems the MP2 syntax is now:
> 
> $r = Apache2::RequestRec->new($c);

nope.  try

  my $r = Apache2::RequestUtil->request;

> $r->content_type("text/html");
> 
> How do I get $c?
> How do I send the http header now?

you don't - apache sends it for you.

--Geoff