On Thu, 28 Sep 2006 10:06:05 +0200, Tom Schindl wrote > Hi, > > Please use one of the modules to read data: > - libapreq2 (http://search.cpan.org/~joesuf/libapreq2-2.08/) > - CGI.pm (comes with your perl-distro maybe you need to update it > from CPAN if you have an older perl) > > Tom > > Erik Norgaard schrieb: > > Hi: > > > > I am using Apache 2.2 with mod_perl2. Reading the documentation I have > > found that I should get POST data using read(): > > > > $r->read($buffer, $r->headers_in('content-length')) > > > > A few questions - ok, some may really be related to the http protocol: > > > > 1) Is the headers_in case sensitive? (content-length ne Content-Length)? > > > > 2) Once in, any tricks or modules for parsing the data? > > > > 3) How about file-uploads, are these binary or base64? > > > > 4) How do I efficiently handle large posts (such as file uploads)? > > > > I know I could bang my head against the keyboard and eventually get some > > working code out, but it seems that these are quite general issues, so > > some solution must exist. > > > > Other question: modperlbook.org is down, is there a mirror or place I > > can download it? > > > > Thanks, Erik > >
to use CGI you do: in the handler use CGI; sub handler { my $r = shift; my $cgi = CGI->new($r); then you can get the parameters like my $someparamvalue=$cgi->param("someparam"); } there is also a way of getting the data from the $r object ( that is:not using the CGI package ), but can't remember right now how to do that, perhaps someone else could tell, please? -- QxRSSReader v1.2.6a released (30-06-2006) PortScanner v1.2.2 ( 09-08-2006 ) http://www.gregerhaga.net/ There are no stupid questions, but there are stupid answers.