>Number:         1291
>Category:       mod_cgi
>Synopsis:       CGI problems are reported as "Server problem - contact the 
>webmaster"
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    apache
>State:          open
>Class:          change-request
>Submitter-Id:   apache
>Arrival-Date:   Tue Oct 21 07:50:00 PDT 1997
>Last-Modified:
>Originator:     [EMAIL PROTECTED]
>Organization:
apache
>Release:        1.2.4
>Environment:
HP-UX 9.05, with HP's C compiler (though this is a generic problem)
>Description:
(Don't worry - this isn't the standard "my CGI program doesn't work" whinge!)

Problems with a CGI script (such as incorrect interpreter paths, wrong or
missing headers, or any of the thousand and one things people get wrong)
fail with a '500 Internal Server Error' code.

  The person browsing (or even the person writing the script), then reports
this "server problem" to the webmaster, whereas the problem actually lies with
the script itself.
>How-To-Repeat:
Choose a random CGI script on almost any web server!
>Fix:
)Return a distinct C function error code, and hence a distinct HTTP return code.
The server can then be configured to display a suitable error page, script, etc.

The source files affected are 'http_protocol.c' and 'httpd.h' (defining the
return codes) and 'mod_cgi.c' and 'util_script.c' (invoking these codes.)

A patch file is available - let me know if you want it.

Dav
>Audit-Trail:
>Unformatted:

Reply via email to