[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Reading post-data


Reif Peter wrote:
Unfortunately you cannot tell $r->read to read just all of the data, you
must provide a length.

How do I solve this problems.

$r->read will return 0 when no more data is available. I have been using the following simple code with success:

my $postdata = "";
while ($r->read(my $buf, 8192)) { $postdata .= $buf; }

You should ofcourse select a read-buffer size that will best suite your setup. I do not know what would be the most optimal setting here.

Cheers,
-- Jani


Mail converted by mhonarc 2.6.15
This archive provided courtesy of JSW4.NET, Internet Hosting Services for Small Business.