When you print Apache2::Const::OK do you get 200?
I'm including it using:
use Apache2::Const -compile => qw( OK REDIRECT FORBIDDEN
REMOTE_DOUBLE_REV );
I get 0. I get the correct codes for others like FORBIDDEN, etc. Go
figure...
I think what I should have used was HTTP_OK, that seems to return 200...
-bop
On Dec 22, 2007, at 10:45 AM, Colin Wetherbee wrote:
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