You are viewing a plain text version of this content. The canonical link for it is here.
Posted to modperl@perl.apache.org by Foo JH <jh...@extracktor.com> on 2007/02/13 10:18:30 UTC

How to obtain the raw http content?

Hi all,

Can anyone point me in the right direction? I am expecting POST with XML 
content, so the usual parser won't work...I think.

Hope this helps.

Re: How to obtain the raw http content?

Posted by Issac Goldstand <ma...@beamartyr.net>.
> Foo JH wrote:
>> Hi all,
>>
>> Can anyone point me in the right direction? I am expecting POST with
>> XML content, so the usual parser won't work...I think.

FYI, The libapreq (aka, Apache::Request) API (at least, the C API) lets
you define your own parsers.  See
http://httpd.apache.org/apreq/docs/libapreq2/apreq__parser_8h.html#562191171c5df0a83360435d0fe1a667

The Perl docs mention an APR::Request::Parser object that can be passed
to apreq, but I don't see any docs for it, and don't know the XS glue
for version 2 well enough to comment further, but if it interests you,
it might be worth looking into.

  Issac

Re: How to obtain the raw http content?

Posted by Fred Moyer <fr...@redhotpenguin.com>.
Foo JH wrote:
> Hi all,
> 
> Can anyone point me in the right direction? I am expecting POST with XML 
> content, so the usual parser won't work...I think.

I've used $r->read() in the past to do exactly what you are specifying.

http://perl.apache.org/docs/2.0/api/Apache2/RequestIO.html#C_read_