[prev in list] [next in list] [prev in thread] [next in thread] 

List:       apache-modperl
Subject:    Re: Newbie help with Apache2::Request configuration
From:       "Philip M. Gollucci" <pgollucci () p6m7g8 ! com>
Date:       2005-12-31 19:22:28
Message-ID: 43B6DA74.4020106 () p6m7g8 ! com
[Download RAW message or body]

Jonathan Vanasco wrote:
> 
> On Dec 31, 2005, at 1:22 PM, Philip M. Gollucci wrote:
> 
>> One does CGI compatible decoding the other doesn't.
> 
> fully knowing this sounds stupid, can i just ask what that means?
APR::Request provides 2 functions encode and decode that access 
application/x-www-form-urlencoded data
which the Apache2::Cookie methods freeze and thaw call for you internally.

APR::Request::Cookie 's freeze/thaw are "no ops" per say... just data 
in/out.

> i've just been using Apache2 wrappers, because I need to access 
> uploads.  and well, my options are this:
> 
>     Apache2::Upload
>     or
>     APR::Request
>         section: uploads (APR::Request::Param::Table???)

http://httpd.apache.org/apreq/docs/libapreq2/group__apreq__xs__apr__request__param.html

If you look at Apache2::Upload you'll see its basically doing that.
sub Apache2::Request::upload {
     my $req = shift;
     my $body = $req->body or return;
     $body->param_class(__PACKAGE__);
     if (@_) {
         my @uploads = grep $_->upload, $body->get(@_);
         return wantarray ? @uploads : $uploads[0];
     }

     return map { $_->upload ? $_->name : () } values %$body
         if wantarray;

    return $body->uploads($req->pool);

}



-- 
------------------------------------------------------------------------
"Love is not the one you can picture yourself marrying,
but the one you can't picture the rest of your life without."

"It takes a minute to have a crush on someone, an hour to like someone,
and a day to love someone, but it takes a lifetime to forget someone..."

Philip M. Gollucci (pgollucci@p6m7g8.com) 301.254.5198
Consultant / http://p6m7g8.net/Resume/resume.shtml
Senior Software Engineer - TicketMaster - http://ticketmaster.com

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic