December 11th Tuesday (十二月 十一日 火曜日)

module AP_MODULE_DECLARE_DATA some_module = {
  STANDARD20_MODULE_STUFF,
  some_dir_cfg,     /* create per-directory config struct */
  some_dir_merge,   /* merge per-directory config struct */
  some_svr_cfg,     /* create per-host config struct */
  some_svr_merge,   /* merge per-host config struct */
  some_cmds,        /* configuration directives for this module */
  some_hooks        /* register module's hooks/etc. with the core */
};

  The STANDARD20_MODULE_STUFF macro expands to provide version information that ensures the compiled module
will load into a server build only when it is fully binary compatible, together with the filename and reserved
fields.  Most of the remaining fields are concerned with module configuration.

  Returning an error code here will cause Apache to return an error page to the client.  Note that the HTTP
standard defines HEAD as being identical to GET except for the response body, which is omitted in HEAD.

  Both methods are included in Apache’s M_GET, and content generator functions should treat them as identical.

Return Values

* OK, to indicate that the handler has fully and successfully dealt with the request. No further processing is necessary.

* DECLINED, to indicate that the handler takes no interest in the request and declines to process it. Apache will then
  try the next handler. The default handler, which simply returns a file from the local disk (or an error page if that fails),
  never return DECLINED, so requests are always handled by some function.

* An HTTP status code, to indicate an error. The handler has taken responsibility for the request, but was unable or unwilling
  to complete it.

  An HTTP status code diverts the entire processing chain within Apache. Normal processing of the request is aborted, and
Apache sets up an internal redirect to an error document, which may either be one of Apache’s predefined defaults or be a
ErrorDocument directive in the server configuration.  Note that this diversion works only if Apache hasn’t already started to
send the response down the wire to the client--this can be an important design consideration in handling errors.  To ensure
correct behavior, any such diversion must take place before writing any data.

 

你可能感兴趣的:(December 11th Tuesday (十二月 十一日 火曜日))