Hi all,

Raymond Wan wrote:
> -----
>
> Yes.  Your code behaves as if CGI.pm was being used by Mason instead
> of apreq.  When that happens, CGI.pm steals the post data, and
> apreq sees nothing but an "End of File" situation.
>
> If I were you, I'd double-check how you configured Mason to select
> apreq instead of CGI.pm.  That's probably where the bug lies.
>
> -----
>   


Just wanted to say that I solved my problem and thought I'd mention it 
in case someone else encounters the problem.  I didn't realize that 
CGI.pm is selected by default and that it was stealing the post data 
silently before apreq2 got at it.  The solution was to add this line to 
httpd.conf:

PerlSetVar MasonArgsMethod 'mod_perl'

Now, this code works:

my $contents = '';
my $req = Apache2::Request -> new ($r);
my $upload = $req->upload ('filename');
my $size = $upload -> slurp($contents);

Thank you Gareth and Shane for your replies!

Ray



-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
_______________________________________________
Mason-users mailing list
Mason-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/mason-users

Reply via email to