From cc40af334e619bb549038238507407866f774f8f Mon Sep 17 00:00:00 2001 From: hongbotian Date: Mon, 30 Nov 2015 01:35:09 -0500 Subject: upload apache JIRA: BOTTLENECK-10 Change-Id: I67eae31de6dc824097dfa56ab454ba36fdd23a2c Signed-off-by: hongbotian --- rubbos/app/apache2/manual/handler.html.en | 159 ++++++++++++++++++++++++++++++ 1 file changed, 159 insertions(+) create mode 100644 rubbos/app/apache2/manual/handler.html.en (limited to 'rubbos/app/apache2/manual/handler.html.en') diff --git a/rubbos/app/apache2/manual/handler.html.en b/rubbos/app/apache2/manual/handler.html.en new file mode 100644 index 00000000..97abe943 --- /dev/null +++ b/rubbos/app/apache2/manual/handler.html.en @@ -0,0 +1,159 @@ + + + +Apache's Handler Use - Apache HTTP Server + + + + + +
<-
+

Apache's Handler Use

+
+

Available Languages:  en  | + es  | + fr  | + ja  | + ko  | + ru  | + tr 

+
+ +

This document describes the use of Apache's Handlers.

+
+ +
top
+
+

What is a Handler

+ + + + +

A "handler" is an internal Apache representation of the + action to be performed when a file is called. Generally, files + have implicit handlers, based on the file type. Normally, all + files are simply served by the server, but certain file types + are "handled" separately.

+ +

Apache 1.1 adds the ability to use handlers explicitly. + Based on either filename extensions or on location, handlers + can be specified without relation to file type. This is + advantageous both because it is a more elegant solution, and + because it also allows for both a type and a + handler to be associated with a file. (See also Files with Multiple + Extensions.)

+ +

Handlers can either be built into the server or included in + a module, or they can be added with the Action directive. The + built-in handlers in the standard distribution are as + follows:

+ +
    +
  • default-handler: Send the file using the + default_handler(), which is the handler used by + default to handle static content. (core)
  • + +
  • send-as-is: Send file with HTTP headers + as is. (mod_asis)
  • + +
  • cgi-script: Treat the file as a CGI + script. (mod_cgi)
  • + +
  • imap-file: Parse as an imagemap rule + file. (mod_imap)
  • + +
  • server-info: Get the server's + configuration information. (mod_info)
  • + +
  • server-status: Get the server's status + report. (mod_status)
  • + +
  • type-map: Parse as a type map file for + content negotiation. (mod_negotiation)
  • +
+
top
+
+

Examples

+ + +

Modifying static content using a CGI script

+ + +

The following directives will cause requests for files with + the html extension to trigger the launch of the + footer.pl CGI script.

+ +

+ Action add-footer /cgi-bin/footer.pl
+ AddHandler add-footer .html +

+ +

Then the CGI script is responsible for sending the + originally requested document (pointed to by the + PATH_TRANSLATED environment variable) and making + whatever modifications or additions are desired.

+ + +

Files with HTTP headers

+ + +

The following directives will enable the + send-as-is handler, which is used for files which + contain their own HTTP headers. All files in the + /web/htdocs/asis/ directory will be processed by + the send-as-is handler, regardless of their + filename extensions.

+ +

+ <Directory /web/htdocs/asis>
+ SetHandler send-as-is
+ </Directory> +

+ + +
top
+
+

Programmer's Note

+ + +

In order to implement the handler features, an addition has + been made to the Apache API that + you may wish to make use of. Specifically, a new record has + been added to the request_rec structure:

+ +

+ char *handler +

+ +

If you wish to have your module engage a handler, you need + only to set r->handler to the name of the + handler at any time prior to the invoke_handler + stage of the request. Handlers are implemented as they were + before, albeit using the handler name instead of a content + type. While it is not necessary, the naming convention for + handlers is to use a dash-separated word, with no slashes, so + as to not invade the media type name-space.

+
+
+

Available Languages:  en  | + es  | + fr  | + ja  | + ko  | + ru  | + tr 

+
+ \ No newline at end of file -- cgit 1.2.3-korg