6 messages in org.apache.perl.modperlReading 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:Reading post-dataActions...
From:Reif Peter (ga@adv.magwien.gv.at)
Date:Jun 11, 2007 2:50:32 am
List:org.apache.perl.modperl

In http://perl.apache.org/docs/2.0/user/porting/compat.html I read:

if one wishes to simply read POST data, there is the more modern filter API, along with continued support for read(STDIN, ...) and $r->read($buf, $r->headers_in->{'content-length'})

But there are two problems with $r->read($buf, $r->headers_in->{'content-length'}

1. An input filter can change the length of the incoming content. It can be longer than before, but the content-length header will not be changed, so some data will be missing.

2. If the POST data are sent per chunked encoding, there is no content-length header at all.

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

How do I solve this problems.

Peter