6 messages in org.apache.perl.modperlRe: Reading post-data
FromSent OnAttachments
Reif PeterJun 11, 2007 2:50 am 
Jani M.Jun 11, 2007 3:56 am 
Reif PeterJun 11, 2007 11:43 pm 
Reif PeterJun 19, 2007 11:44 pm 
Fred MoyerJun 19, 2007 11:59 pm 
Reif PeterJun 20, 2007 12:34 am 
Actions with this message:
Paste this link in email or IM:
Paste this link in email or IM:
Atom feed for this thread
Paste this URL into your reader:
Subject:Re: Reading post-dataActions
From:Jani M. (moo@iki.fi)
Date:Jun 11, 2007 3:56:17 am
List:org.apache.perl.modperl

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