On Fri, Jan 17, 2003 at 04:36:58PM +1100, Stas Bekman 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!

That's correct behaviour :) If the CGI outputs valid headers and a blank
newline, then it's considered valid. Any subsequent errors or return
status within the CGI have no effect.

-- 
[EMAIL PROTECTED]        PubKey: [EMAIL PROTECTED]  
Web:                                 http://devnull.redbrick.dcu.ie/ 

Reply via email to