proper use of $r->read?

E R <[email protected]>
Newsgroups gmane.comp.apache.mod-perl
Message-ID <[email protected]>
Hi,

What's the proper way to read in the posted content from a request?

Using this Google code search:

http://www.google.com/codesearch?q=lang%3Aperl+%5C%24r-%3Eread.*length&hl=en

I see instances of:

  $r->read($line, $r->headers_in->get('Content-length'));

and also loops like:

    while ( $r->read( $buffer, $content_length ) ) {
        $content .= $buffer;
    }

What's the best/proper way to slurp in all of the POST content?

Thanks,
ER
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.