I'm posting to mp , as this is perl-glue related.
as a note, I'm using OS X as a dev box , and apreq doesn't compile
right on it - so that might be the problem
-----
i'm standardizing my some functions to release into cpan and am at a
bit of a loss on catching apreq errors.
I have this code:
my $want_to_die= 0;
my $req;
eval {
$req= Apache2::Request->new( $r , %apr_args );
$r->discard_request_body;
my $args_status = $req->args_status ;
my $body_status = $req->body_status ;
my $param_status= $req->param_status ;
print STDERR "\n args_status $args_status || " . ( ref $args_status );
print STDERR "\n body_status $body_status || " . ( ref $body_status );
print STDERR "\n param_status $param_status ||" . ( ref
$param_status );
my $body;
if ( $want_to_die ) {
my $body = $req->body ;
print STDERR "\n body $body ||" . ( ref $body );
}
};
print STDERR "$@ || " . ( ref $@ );
The behavior I've observed is:
If there is no POST , param_status + body_status are 'Missing input
data'
If there is POST, but its too big, param_status + body_status is
'Exceeds configured maximum limit'
If i submit any query string GET args, args_status is "Unknown
error: 0"
If i submit no query string / GET args, args_status is "Missing
input data"
if i try to access the body on an overlimit, THEN i'll pull an error
into [EMAIL PROTECTED] ( $want_to_die= 1 )
The issue I have is:
All of the _status returns are just plain strings,
The text I get on what seems to be valid calls doesn't make sense:
Missing input data / Unknown error -- those look like errors to me.
but they're not.
The only way I can seem to pull an actual error is accessng the body/
param directly , and ignoring the object.
So : Is there a standardized way I can test for having an error or
not ? and are my status strings giving me the correct info ?
// Jonathan Vanasco
| - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- - - - - - - - - - - - - - - - - - -
| SyndiClick.com
| - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- - - - - - - - - - - - - - - - - - -
| FindMeOn.com - The cure for Multiple Web Personality Disorder
| Web Identity Management and 3D Social Networking
| - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- - - - - - - - - - - - - - - - - - -
| RoadSound.com - Tools For Bands, Stuff For Fans
| Collaborative Online Management And Syndication Tools
| - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- - - - - - - - - - - - - - - - - - -