On Wed, Aug 18, 2004 at 09:53:17AM -0400, Geoffrey Young wrote:
> 
> hi honza, a flash from the past :)

Past flash stuck here between POSTs, GETs, SOAPs, etc. ;-)

> > Is there any way to retrieve the raw content (and headers) of the
> > HTTP request in mod_perl2, and have this raw access coexist with
> > Apache::Request? Or is this a bad application design on my side and
> > should I always have separate handlers for separate access methods?
> 
> see the httpd-apreq project (aka libapreq, Apache::Request, mod_apreq).
> 
>   http://httpd.apache.org/apreq/
> 
> mod_apreq allows you to read the message body multiple times over the course
> of the request, which is what it sounds like you are after.

I have httpd-apreq / Apache::Request in my setup, in fact what I do
is basically

        use Apache::Request ();
        my $request = Apache::Request->new($r);
        if ($r->method eq 'POST') {
                # process $request->param and $request->body
        } elsif ($r->method eq 'GET') {
                # process $request->args
        }

and it works great. However, I'm probably missing something but how do
you do equivalent of $r->read($buffer, 64_000) multiple times? I can
create multiple Apache::Request objects based on one $r just fine but
that does not seem to give me the raw message body, does it?

-- 
------------------------------------------------------------------------
 Honza Pazdziora | [EMAIL PROTECTED] | http://www.fi.muni.cz/~adelton/
 .project: Perl, mod_perl, DBI, Oracle, large Web systems, XML/XSL, ...
                Only self-confident people can be simple.

-- 
Report problems: http://perl.apache.org/bugs/
Mail list info: http://perl.apache.org/maillist/modperl.html
List etiquette: http://perl.apache.org/maillist/email-etiquette.html

Reply via email to