Module mod_actions

Important: Information for this topic supports the latest PTF levels for HTTP Server for i5/OS . It is recommended that you install the latest PTFs to upgrade to the latest level of the HTTP Server for i5/OS. Some of the topics documented here are not available prior to this update. See http://www.ibm.com/servers/eserver/iseries/software/http/services/service.htm Link outside Information Center for more information.

Summary

The module mod_actions provides for executing CGI scripts based on media type or request method.

Directives

Action

Module: mod_actions
Syntax: Action action-type cgi-script
Default: none
Context: server config, virtual host, directory, .htaccess
Override: FileInfo
Origin: Apache
Example: Action application/x-www-form-urlencoded /cgi-bin/file.pgm

The Action directive adds an action, which will activate CGI script when action-type is triggered by the request.

Parameter One: action-type
  • The action-type can be either a handler or a MIME content type. It sends the URL and file path of the requested document using the standard CGI PATH_INFO and PATH_TRANSLATED environment variables. See Handler for HTTP Server (powered by Apache) for more information on handlers.
Parameter Two: CGI-script
  • The CGI-script can be any valid CGI script or other resource that is capable of handling the requested action-type.

Script

Module: mod_actions
Syntax: Script method CGI-script
Default: none
Context: server config, virtual host, directory
Override: none
Origin: Apache
Example: Script PUT /cgi-bin/bob.pgm

The Script directive adds an action, which will activate CGI-script when a file is requested using the method of method. It sends the URL and file path of the requested document using the standard CGI PATH_INFO and PATH_TRANSLATED environment variables. Method names are case-sensitive, so Script PUT and Script put have two entirely different effects.

Parameter One: method
  • The method names listed can be one or more of the following: GET, POST, PUT, DELETE, CONNECT, OPTIONS, PATCH, PROPFIND, PROPPATCH, MKCOL, COPY, MOVE, LOCK and UNLOCK. User defined method names can also be used. The method name is case-sensitive. If GET is used it will also handle HEAD requests.
Parameter Two: CGI-script
  • The CGI-script can be any valid CGI script or other resource that is capable of handling the requested method.
Note: The CGI-script command defines default actions only. If a CGI script is called, or some other resource that is capable of handling the requested method internally, it will do so. Also note that CGI script with a method of GET will only be called if there are query arguments present (for example, bob.html?hi). Otherwise, the request will proceed normally.