You are viewing a plain text version of this content. The canonical link for it is here.
Posted to apreq-dev@httpd.apache.org by Joe Schaefer <jo...@sunstarsys.com> on 2005/08/27 02:05:32 UTC

Re: [apreq2] problem with $req->args('key')

"Nikolay Ananiev" <an...@thegdb.com> writes:

> $req->args('key'); doesn't return the value of 'key' but the whole
> query string.

Please use APR::Request::Apache2 instead of Apache2::Request.

-- 
Joe Schaefer


Re: [apreq2] problem with $req->args('key')

Posted by Joe Schaefer <jo...@sunstarsys.com>.
"William A. Rowe, Jr." <wr...@rowe-clan.net> writes:

> At 07:05 PM 8/26/2005, Joe Schaefer wrote:
>>"Nikolay Ananiev" <an...@thegdb.com> writes:
>>
>>> $req->args('key'); doesn't return the value of 'key' but the whole
>>> query string.
>>
>>Please use APR::Request::Apache2 instead of Apache2::Request.
>
> That's a really weird construct; how/when did Apache2's Request
> land inside of APR?  That's certainly not the OO hierarchy :)

2.05-dev was when the APR::Request:: modules were introduced.
There are several modules in there, only one of which depends
on Apache2.

-- 
Joe Schaefer


Re: [apreq2] problem with $req->args('key')

Posted by "William A. Rowe, Jr." <wr...@rowe-clan.net>.
At 07:05 PM 8/26/2005, Joe Schaefer wrote:
>"Nikolay Ananiev" <an...@thegdb.com> writes:
>
>> $req->args('key'); doesn't return the value of 'key' but the whole
>> query string.
>
>Please use APR::Request::Apache2 instead of Apache2::Request.

That's a really weird construct; how/when did Apache2's Request
land inside of APR?  That's certainly not the OO hierarchy :)

Bill



Re: Can't locate object method "FIRSTKEY"

Posted by Herve Guillemet <hg...@apteryx.fr>.
On Fri, 7 Oct 2005, Joe Schaefer wrote:

> Herve Guillemet <hg...@apteryx.fr> writes:
>
>> Can't locate object method "FIRSTKEY" via package
>> "APR::Request::Param::Table"
>>
>> when I try something like :
>>
>> my $req =  APR::Request::Apache2->handle($r);
>> my $table = $req->param;
>> my $fk = each %$table;
>>
>> While using Apache2::Request does work.
>>
>> How could this be ?
>
> Probably because APR::Request::Param isn't loaded, but I've
> patched trunk so that shouldn't be required in the coming 2.07 release
> (APR::Request::Param::Table is now contained in APR::Request).
>

Thanks, "use APR::Request::Param" does solve the problem.
The same happens for APR::Request::Cookie and might need to be fixed too.

Re: Can't locate object method "FIRSTKEY"

Posted by Joe Schaefer <jo...@sunstarsys.com>.
Herve Guillemet <hg...@apteryx.fr> writes:

> Can't locate object method "FIRSTKEY" via package
> "APR::Request::Param::Table" 
>
> when I try something like :
>
> my $req =  APR::Request::Apache2->handle($r);
> my $table = $req->param;
> my $fk = each %$table;
>
> While using Apache2::Request does work.
>
> How could this be ?

Probably because APR::Request::Param isn't loaded, but I've 
patched trunk so that shouldn't be required in the coming 2.07 release
(APR::Request::Param::Table is now contained in APR::Request).

-- 
Joe Schaefer


Can't locate object method "FIRSTKEY"

Posted by Herve Guillemet <hg...@apteryx.fr>.
Hi,

I get :

Can't locate object method "FIRSTKEY" via package "APR::Request::Param::Table"

when I try something like :

my $req =  APR::Request::Apache2->handle($r);
my $table = $req->param;
my $fk = each %$table;

While using Apache2::Request does work.

How could this be ?

Thanks,

== Hervé Guillemet

Re: [apreq2] problem with $req->args('key')

Posted by Nikolay Ananiev <an...@thegdb.com>.
"Joe Schaefer" <jo...@sunstarsys.com> wrote in message
news:877je81bxv.fsf@gemini.sunstarsys.com...
> "Nikolay Ananiev" <an...@thegdb.com> writes:
>
> > $req->args('key'); doesn't return the value of 'key' but the whole
> > query string.
>
> Please use APR::Request::Apache2 instead of Apache2::Request.

Thank you, Joe. That solved my problem.
I have one more question.
With Apache2::Request I used
$req->discard_request_body for non-POST requests.
How do I do it with APR::Request::Apache2?
Or there's no point to do it?