That is correct behaviour to send a 200 since the HTTP headers are complete.
It's always been this way.

I am working on a modification to mod_cgi so a module can register a special 
output_and_stderr filter, parse stderr, and can send a 500 if it deems necessary.

> -----Original Message-----
> From: Stas Bekman [SMTP:[EMAIL PROTECTED]]
> Sent: Thursday, January 16, 2003 11:37 PM
> To:   [EMAIL PROTECTED]
> Subject:      bug in mod_cgi (sends 200 instead of 500)
> 
> 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!
> 
> HTTP/1.1 200 OK
> Date: Fri, 17 Jan 2003 05:33:12 GMT
> Server: Apache/2.1.0-dev (Unix) mod_perl/1.99_09-dev Perl/v5.9.0 
> mod_ssl/2.1.0-dev OpenSSL/0.9.6g DAV/2
> Connection: close
> Content-Type: text/plain; charset=ISO-8859-1
> 
> __________________________________________________________________
> 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
> 

Reply via email to