Re: post body parsing
Torsten Förtsch <[email protected]> Wed, 20 Jul 2011 23:24:46 +0200
| Newsgroups | gmane.comp.apache.apreq |
|---|---|
| Message-ID | <[email protected]> |
On Wednesday, 20 July 2011 17:14:38 Zbynek Jun wrote: > post body: > a=3D&a&b=3Dx&b=3D&b&a=3Dx&c=3Dx >=20 > ideal case: > 'a' =3D> [ '', '', 'x' ], 'b' =3D> [ 'x', '', ''], 'c' =3D> [ 'x'] I'd say the ideal case would be a list: 'a', '', 'a', undef, 'b', 'x', 'b', undef, 'a', 'x', 'c', 'x' Anything else drops information. "a=3D" is not necessarily the same as=20 simply "a" and "a=3D1&b=3D2&a=3D3" is not necessarily the same as=20 "a=3D1&a=3D3&b=3D2". > from Apache2::Request: > 'a' =3D> '', 'b' =3D> '', 'c' =3D> 'x', 'a&b' =3D> 'x', 'b&a' =3D> 'x' >=20 > Post body is properly encoded and posted with Content-Type=20 > 'application/x-www-form-urlencoded; charset=3DUTF-8' via > XMLHttpRequest. Server is Apache/2.2.17 (FreeBSD), libapreq2-2.13. > Some ideas ? Is it possible to get unparsed post body from > Apache2::Request ? You can read the request body via the Apache2::RequestRec object if=20 Apache2::RequestIO is loaded. http://perl.apache.org/docs/2.0/api/Apache2/RequestIO.html#C_read_ Torsten F=F6rtsch =2D-=20 Need professional modperl support? Hire me! (http://foertsch.name) Like fantasy? http://kabatinte.net