On Sun, 2006-10-22 at 12:48 -0400, Jonathan wrote:
> 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
>

Apache2::Const::OK == 0
Apache2::Const::HTTP_OK = 200

Not the same.

> 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


You should set the status like this:
$r->status(Apache2::Const::HTTP::OK);
return Apache2::Const::OK

Clint