Webmaster in a Nutshell

Previous Chapter 24 Next
 

24.5 Script Configuration

The CERN server does not provide built-in support for all of the HTTP request methods. PUT and DELETE are omitted and POST is handled only in the case of a CGI program handling HTML form data. To compensate for the lack of internal support, the CERN server has several directives so that you may provide CGI programs to handle these cases.

DELETE-Script

DELETE-Script scriptname

The DELETE-Script directive specifies a CGI program to act as a general DELETE request handler. The program should be given as an absolute path. For example:

DELETE-Script /www/cgi-bin/terminator

When a DELETE request is received, the program given with the directive will be executed in a CGI environment, with the name of the requested document put into the PATH_INFO CGI variable.

POST-Script

POST-Script scriptname

The POST-Script directive specifies a CGI program to act as a handler for non-CGI POST requests. The program should be given as an absolute path. For example:

POST-Script /www/cgi-bin/my_poster

When a POST request is received, unless it references a CGI program explicitly, this program will be executed in a CGI environment, with the name of the requested document put into the PATH_INFO CGI variable.

PUT-Script

PUT-Script scriptname

The PUT-Script directive specifies a CGI program to act as a general PUT request handler. The program should be given as an absolute path. When a PUT request is received, the program given with the directive will be executed in a CGI environment, with the name of the requested document put into the PATH_INFO CGI variable.

Search

Search scriptname

The Search directive specifies a CGI program to act as a handler for non-CGI GET requests that include a query string, making it act for GET almost as POST-Script does for POST. The purpose of this directive is to provide a search mechanism for requested documents. The program name should be given as an absolute path. As with the other script directives, this program is executed with the actual document path stored in the PATH_INFO CGI variable.


Previous Home Next
Logging Book Index Directory Indexing