From: Daniel Gruno Date: Tue, 26 Jun 2012 11:15:11 +0000 (+0000) Subject: Updates X-Git-Tag: 2.5.0-alpha~6696 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=9a2392e2c0ac1c32c5586450bf5fe6fd3467af75;p=thirdparty%2Fapache%2Fhttpd.git Updates git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1353955 13f79535-47bb-0310-9956-ffa450edef68 --- diff --git a/docs/manual/developer/modguide.xml b/docs/manual/developer/modguide.xml index 8434a170116..e1c2b155b93 100644 --- a/docs/manual/developer/modguide.xml +++ b/docs/manual/developer/modguide.xml @@ -37,7 +37,7 @@ Server 2.4

Introduction
What we will be discussing in this document

-This document will discuss how you can easily create modules for the Apache +This document will discuss how you can create modules for the Apache HTTP Server 2.4, by exploring an example module called mod_example. In the first part of this document, the purpose of this module will be to calculate and print out various digest values for @@ -238,6 +238,8 @@ can create. Some other ways of hooking are:

  • ap_hook_pre_config: Place a hook that executes before any configuration data has been read (very early hook)
  • ap_hook_post_config: Place a hook that executes after configuration has been parsed, but before the server has forked
  • ap_hook_translate_name: Place a hook that executes when a URI needs to be translated into a filename on the server (think mod_rewrite)
  • +
  • ap_hook_quick_handler: Similar to ap_hook_handler, except it is run before any other request hooks (translation, auth, fixups etc)
  • +
  • ap_hook_log_transaction: Place a hook that executes when the server is about to add a log entry of the current request
  • @@ -314,9 +316,10 @@ request_req structure are:
  • r->args (char*): Contains the query string of the request, if any
  • r->headers_in (apr_table_t*): Contains all the headers sent by the client
  • r->connection (conn_rec*): A record containing information about the current connection
  • +
  • r->user (char*): If the URI requires authentication, this is set to the username provided
  • r->useragent_ip (char*): The IP address of the client connecting to us
  • -
  • r->pool (apr_pool_t*): The memory pool of this request. We'll discuss this in the " -Memory management" chapter.
  • +
  • r->pool (apr_pool_t*): The memory pool of this request. We'll discuss this in the +"Memory management" chapter.
  • A complete list of all the values contained with in the request_req structure can be found in @@ -1277,10 +1280,11 @@ two configurations and decide how they are to be merged:

    void* merge_dir_conf(apr_pool_t* pool, void* BASE, void* ADD) { - example_config* base = (example_config *) BASE ; - example_config* add = (example_config *) ADD ; - example_config* conf = (example_config *) create_dir_conf(pool, "Merged configuration"); + example_config* base = (example_config *) BASE ; /* This is what was set in the parent context */ + example_config* add = (example_config *) ADD ; /* This is what is set in the new context */ + example_config* conf = (example_config *) create_dir_conf(pool, "Merged configuration"); /* This will be the merged configuration */ + /* Merge configurations */ conf->enabled = ( add->enabled == 0 ) ? base->enabled : add->enabled ; conf->typeOfAction = add->typeOfAction ? add->typeOfAction : base->typeOfAction; strcpy(conf->path, strlen(add->path) ? add->path : base->path); @@ -1619,7 +1623,7 @@ static int example_handler(request_req *r) if (formData) { int i; for (i = 0; formData[i]; i++) { - ap_rprintf(r, "%s == %s\n", formData[i]->key, formData[i]->value); + ap_rprintf(r, "%s = %s\n", formData[i]->key, formData[i]->value); } } return OK;