Yup, slight memory error when responding, sorry :)

$r->content is going to be empty if you're not using the 
application/x-www-form-urlencoded, perldoc Apache.

Page 131 of the Eagle book also says

"If the browser uses the newer multiport/form-data encoding (which is 
used for  file uploads, among other things), then mod_perl users will 
have to read and parse the content information themselves."

You need to use Apache::Request, or CGI.pm to do a file upload.  It's 
not going to work otherwise.   I've never had a problem with A::Request 
in production use; I don't think it's considered experimental any 
more.

cheers,
Todd

At 11:49 PM 5/13/02, Mike Melillo wrote:

>No, It specifies multipart/form-data because page 131 of the eagle 
>says
>its used for file uploads.
>
>Mike
>
>-----Original Message-----
>From: Todd Finney [mailto:[EMAIL PROTECTED]]
>Sent: Monday, May 13, 2002 11:16 PM
>To: [EMAIL PROTECTED]
>Subject: Re: $r->args vs $r->content
>
>At 10:29 PM 5/13/02, Mike Melillo wrote:
> >It works, but if I use the method in the eagle book for POST 
> requests
> >%params = $r->content; then nothing gets returned.  I've even 
> printed
> >%params to the apache errlog with DataDumper, and its empty.
> >
> >One of the fields is an image file that will be uploaded so I need 
> to
> >use POST requests.  Is this a job for Apache::Request?  The eagle 
> book
> >doesn't cover it much because it was "experimental" at the time of
> >publishing.
>
>Does your FORM tag specify enctype="application/x-www-urlencoded"?
>
>cheers,
>Todd

Reply via email to