On Apr 25, 2006, at 12:24, Aaron Trevena wrote:

On 25/04/06, Nic Gibson <[EMAIL PROTECTED]> wrote:
> Now - who knows what I should return instead of -1??
>
> At the top of httpd.h declined, ok and done are defined as -1, 0 and
> -2 respectively - server_error seems to be 500 - but the
> Apache::Constant documentation warn against returning http status
> codes and say to use constants instead.

Yes, I think you should probably define ERROR as SERVER_ERROR from
Apache::Constants.
If one is writing a mod_perl handler from scratch, that's one would
return (on error). However, given the various frontends that could be
difficult. Under CGI, the actual return looks to be irrelevant
(status being set in the header). I think that defining the constant
to have the value 500 is *safe* (HTTP being unlikely to change in the
short term). There may be better answers here that allow the actual
application package (CGI::Maypole , Apache::MVC) to determine the
actual error code to be passed back? Short term answer looks, to me,
like set it to 500 and consider for another version?

That didn't really help, did it?

Yes it did a bit. I just spoke on #mod_perl on irc and they agreed
that it should be 500, only OK, DECLINED and DONE are different to
HTTP status codes.

That's what I was trying to say but much clearer.


Given that CGI ignores the return value I think that returning correct
HTTP status code would be wise and I'll try and get that change done.

Great :)

nic



-------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________
Maypole-users mailing list
Maypole-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/maypole-users

Reply via email to