I started supporting 400/403 errors in a mod_perl handler for an API
on my projects

I ran into this odd little issue:

With this line:
DEBUG_STATUS && print STDERR ("\n status-> " . $r->status() . ' |
' . Apache2::Const::OK );
I'd expect to see
status-> 200 | 200

Instead, I see
status-> 200 | 0

and this is where it gets more odd...

if I return $r->status() from the handler ( which is HTTP OK - i
always check, and i have a 200 ) i see this appended to my documents
====

OK

The server encountered an internal error or misconfiguration and was
unable to complete your request.

Please contact the server administrator, techs@xxxxxx.com and inform
them of the time the error occurred, and anything you might have done
that may have caused the error.

More information about this error may be available in the server
error log.

====

if i return NULL / undef -- i'm fine.


the current workaround, is for me to do

return ( $r->status() >= 200 && $r->status()<=204 ) ? 0 : $r->status();

which is just stupid.

i must be missing something, or have something configured incredibly
wrong somewhere.


// Jonathan Vanasco

| - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- - - - - - - - - - - - - - - -
| 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
| - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- - - - - - - - - - - - - - - -