Hi John,

> I notice, in the getting started documentation, that I am supposed to return
> Apache2::Const::OK to indicate an HTTP 200 success status

Actually, that's not about sending a HTTP 200 success status.  You
return Apache2::Const::OK to tell httpd that your handler ran
correctly.

> When I print out other values of
> constants from the same package they seem to have numeric values which
> directly correspond to their respective HTTP status codes.

True, but it's just due to a lack of imagination on the part of the
httpd developers.  The only constants that intentionally contain valid
HTTP status codes are the Apache2::Const::HTTP_* ones.

> However, it strikes me as a extremely bizarre,
> especially when returning Apache2::Const::HTTP_OK, which does evaluate to
> 200, causes Apache2 to response with a canned error response page

Right because you returned something other than HTTP::Const::OK,
meaning your handler failed and httpd should sound the alarm.

I hope that clears it up for you.  This is a common confusion, so
nothing to feel bad about.

- Perrin

Reply via email to