perl-modperl mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Colin Wetherbee <...@denterprises.org>
Subject Re: Find the values of Apache2::Const
Date Sat, 22 Dec 2007 16:45:11 GMT
Boysenberry Payne wrote:
> I only ask because I tried a $r->status(Apache2::Const::OK) and got a
>  500 returned in the header even though my handler returned with
> Apache::Const::OK also...
> 
> To avoid the 500 header I had to do $r->status(200);  I imagine the 
> status code isn't going to change too soon, so I ought to be okay,
> right?

The HTTP/1.1 status codes are defined in RFC 2616 [0], section 6.1.1.  I 
doubt they will change any time soon, so it should be fine to use the 
numbers.

However, if your constants aren't working like they should, it's 
probably worth figuring out why.

I always include my constants with the following line.  Deviating from 
this specific syntax always seems to break stuff for me.

use Apache2::Const -compile => qw(:common);

Colin

[0] http://www.faqs.org/rfcs/rfc2616.html

Mime
View raw message