perl-modperl mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From John Dunlap <>
Subject Returning 200 status from my handler
Date Sat, 11 Jan 2014 02:36:46 GMT
I'm new to mod_perl within the last year, so I apologize if this is a silly

I notice, in the getting started documentation, that I am supposed to
return Apache2::Const::OK to indicate an HTTP 200 success status but when I
print out the value of this constant I get 0. 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.

I realize that using the constants means that I shouldn't need to know what
their actual values are. 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(similar
to what you see when it returns a 500 error, but it does so with a 200
response code. IE: Apache will return my response body if my handler
returns 0 and one of its default error pages when my handler returns 200.
Why are there conflicting constants in Apache2::Cont which evaluate to
different values when only one of them works correctly? I can return 200
from my handler if I register a custom_response for status 200 but this
just seems wrong to me.

Am I missing something?


View raw message