All,
I'm currently writing some HTML::Mason code to handle file uploads
under mod_perl 1 and mod_perl 2. The uploads are put into a hash
where the keys are the names and the values are either Apache::Upload
objects or Apache2::Upload objects, and further munging happens after
that. Everything works as I expect under mod_perl 1; however, under
mod_perl 2, there is a problem.
As soon as I attempt to call Apache2::Request->upload, all other
execution appears to stop and the browser displays only "End of file
found".
I found this thread in the archives:
http://www.gossamer-threads.com/lists/modperl/modperl/82182
...and while I was writing this I discovered a solution, which I now
provide here in case anyone else is confused.
Current versions of HTML::Mason, while they are running under
mod_perl2, use CGI.pm to decipher arguments. It is possible to
configure HTML::Mason to use Apache::RequestRec and friends by
altering a configuration parameter, as discussed here, under "Common
Problems: Errors Involving Apache2::Request."
http://www.masonhq.com/?ApacheModPerl2
I'm not sure precisely why this happened, but it appears to be most
likely ascribable to differences in what Mason's global $r object
contains when CGI.pm is used to decipher the arguments as opposed to
what the $r object contains when Apache2::Request is used.
Charlton
--
Charlton Wilbur
[EMAIL PROTECTED]