httpd-apreq-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Nicholas Studt <>
Subject libapreq file upload
Date Fri, 24 Dec 2004 03:23:26 GMT
I'm working on porting to MP2 and libapreq2 (2.05 snapshot from 11-29)
and have hit a snag with file upload.

I am trying to convert the following construct to mp2

my $apr = Apache::Request->new( $r, TEMP_DIR => '/tmp',
                                POST_MAX => 2097152 );

my $status  = $apr->parse;
return( 'Error: Upload File too large.' ) if ( $status );

If I read the documentation correctly the parse call should no longer be
needed, but I am having problems trapping the case when the file upload
is too large. 

I've tried checking body_status and arg_status but they don't seem to
work as I would expect which is to say that body_status always returns
70022 and arg_status always returns 0. 

Am I just missing something simple, or am I looking in the wrong place
to test for this case?

Nicholas Studt <>

View raw message