Justin Erenkrantz wrote:
--On Friday, January 17, 2003 4:36 PM +1100 Stas Bekman <[EMAIL PROTECTED]> wrote:
Consider this mod_cgi script:# !/usr/bin/perl -w print "Content-type: text/plain\n\n"; print no_such_func(); print "Shouldn't be printed"; httpd.conf: ScriptAlias /cgi-bin/ "/home/httpd/2.0/perl/" The error is correctly logged: [Fri Jan 17 16:31:03 2003] [error] [client 127.0.0.1] Undefined subroutine &main::no_such_func called at /home/httpd/2.0/perl/500.pl line 6. Though the client gets the response code 200!Why do you think that would be a 500?
>
I don't think merely writing stuff out to stderr or returning with an non-zero status code shouldn't be grounds for a 500. -- justinBecause the script has failed. Not because it has written something to stderr. But because the exec's return status is not 0.
% perl -lwe 'no_such_func();' || echo $?
Undefined subroutine &main::no_such_func called at -e line 1.
255
It shows that I haven't run mod_cgi for ages. I was just used to having this as a failure (500) under mod_perl. Any reason for not checking the return status?
__________________________________________________________________
Stas Bekman JAm_pH ------> Just Another mod_perl Hacker
http://stason.org/ mod_perl Guide ---> http://perl.apache.org
mailto:[EMAIL PROTECTED] http://use.perl.org http://apacheweek.com
http://modperlbook.org http://apache.org http://ticketmaster.com
