Perrin Harkins wrote: > Geoffrey Young wrote: > >>actually, REDIRECT is an alias for HTTP_MOVED_TEMPORARILY. from >>modperl_constants.c: >> >> if (strEQ(name, "REDIRECT")) { >> return newSViv(HTTP_MOVED_TEMPORARILY); >> } > > > Isn't that basically a coincidence though? I thought the non-HTTP > constants were subject to change at any time, which is why they're defined > in the core instead of hard-coding numbers in scripts.
in this specific case it's historical. httpd-1.3.X did this in httpd.h: #define HTTP_MOVED_TEMPORARILY 302 ... #define REDIRECT HTTP_MOVED_TEMPORARILY #define USE_LOCAL_COPY HTTP_NOT_MODIFIED #define BAD_REQUEST HTTP_BAD_REQUEST #define AUTH_REQUIRED HTTP_UNAUTHORIZED ... and mp1 passed all these along. httpd-2.0 did away with REDIRECT as a constant, kinda forcing everyone to use the HTTP_* form of things. early on in mp2 construction enough people complained that we added mod_perl-specific aliases for the most common of the old httpd-1.0-style constants (REDIRECT, SERVER_ERROR, etc) to make the transition easier. so, in short, REDIRECT is valid and officially equivalent to 302 in apache 1.0, but in apache 2.0 it's not so we've faked it in mod_perl land for the sake of our users (right or wrong). --Geoff